I'm currently using the Stepper widget and trying to recreate something as shown below. I can't understand how to align the text below the circle instead of on the right. This is my code:
Widget build(BuildContext context) {
return Container(
height: 300,
width: 300,
child: Stepper(
currentStep: _index,
onStepCancel: () {
if (_index <= 0) {
return;
}
setState(() {
_index--;
});
},
onStepContinue: () {
if (_index >= 1) {
return;
}
setState(() {
_index++;
});
},
onStepTapped: (index) {
setState(() {
_index = index;
});
},
steps: [
Step(
title: Text("Step 1 title"),
content: Container(
alignment: Alignment.centerLeft,
child: Text("Content for Step 1")),
),
Step(
title: Text("Step 2 title"),
content: Text("Content for Step 2"),
),
],
),
);
}
Current code result:
Trying to achieve: