You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@OverRide
Widget build(BuildContext context) {
return Consumer(
builder: (context, provider, child) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
onPressed: () async {
if (provider.workFlowPageLoader != true) {
context.go(RouteNames.workflow.path);
await SharedPreferenceUtil()
.remove(SharedPreferenceHelper.selectedWorkflowId);
}
},
icon: const Icon(
Icons.arrow_back,
),
color: Colors.black87,
iconSize: 36,
),
const SubHeadingText(subHeadingText: 'Workflow steps'),
],
),
Divider(
thickness: 1,
color: greyTextColor,
),
const SizedBox(height: 8),
provider.workFlowPageLoader
? const Expanded(
child: Center(
child: CircularProgressIndicator(),
),
)
: provider.stepList.isEmpty
? _initialContainer(provider)
: Expanded(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: InteractiveViewer(
constrained: false,
boundaryMargin:
const EdgeInsets.only(top: 48, bottom: 48),
minScale: 0.01,
maxScale: 5.6,
child: GraphView(
key: provider.graphKey,
graph: provider.graph,
algorithm: BuchheimWalkerAlgorithm(
builder, TreeEdgeRenderer(builder)),
paint: Paint()
..color = Colors.green
..strokeWidth = 1
..style = PaintingStyle.stroke,
builder: (Node node) {
var nodeData =
node.key?.value as Map<String, dynamic>;
if (nodeData['id'] == -1) {
return _initialContainer(provider);
} else {
return _buildStepContainer(
nodeData['value'], provider);
}
},
),
),
),
),
],
);
},
);
} This is my build method. when this tree become linear means one child for each node then at that case it is aligning in the top left of the parent container. I tried by centre widget alignment widget but nothing works. Also there are extra space beween top node and its parent and while scrolling that's space gets disappear. Please fix this issue.
The text was updated successfully, but these errors were encountered:
@OverRide
Widget build(BuildContext context) {
return Consumer(
builder: (context, provider, child) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
onPressed: () async {
if (provider.workFlowPageLoader != true) {
context.go(RouteNames.workflow.path);
await SharedPreferenceUtil()
.remove(SharedPreferenceHelper.selectedWorkflowId);
}
},
icon: const Icon(
Icons.arrow_back,
),
color: Colors.black87,
iconSize: 36,
),
const SubHeadingText(subHeadingText: 'Workflow steps'),
],
),
Divider(
thickness: 1,
color: greyTextColor,
),
const SizedBox(height: 8),
provider.workFlowPageLoader
? const Expanded(
child: Center(
child: CircularProgressIndicator(),
),
)
: provider.stepList.isEmpty
? _initialContainer(provider)
: Expanded(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: InteractiveViewer(
constrained: false,
boundaryMargin:
const EdgeInsets.only(top: 48, bottom: 48),
minScale: 0.01,
maxScale: 5.6,
child: GraphView(
key: provider.graphKey,
graph: provider.graph,
algorithm: BuchheimWalkerAlgorithm(
builder, TreeEdgeRenderer(builder)),
paint: Paint()
..color = Colors.green
..strokeWidth = 1
..style = PaintingStyle.stroke,
builder: (Node node) {
var nodeData =
node.key?.value as Map<String, dynamic>;
if (nodeData['id'] == -1) {
return _initialContainer(provider);
} else {
return _buildStepContainer(
nodeData['value'], provider);
}
},
),
),
),
),
],
);
},
);
} This is my build method. when this tree become linear means one child for each node then at that case it is aligning in the top left of the parent container. I tried by centre widget alignment widget but nothing works. Also there are extra space beween top node and its parent and while scrolling that's space gets disappear. Please fix this issue.
The text was updated successfully, but these errors were encountered: