import 'package:gluestack_ui/gluestack_ui.dart';
//...
GSStepper(
currentStep: _index,
size: GSSizes.values[context.knobs
.options(label: 'Size', initial: 1, options: sizeOptions)],
onStepCancel: () {
if (_index > 0) {
setState(() {
_index -= 1;
});
}
},
onStepContinue: () {
if (_index <= 0) {
setState(() {
_index += 1;
});
}
},
onStepTapped: (int index) {
setState(() {
_index = index;
});
},
steps: <GSStep>[
GSStep(
title: const Text('Onboarding'),
content: Container(
alignment: Alignment.centerLeft,
child: const Text('Welcome!!'),
),
),
GSStep(
title: const Text('Project Setup'),
content: Container(
alignment: Alignment.centerLeft,
child: const Text('Setup the base project.'),
),
),
GSStep(
title: const Text('Code'),
content: Container(
alignment: Alignment.centerLeft,
child: const Text('Start your coding journey.'),
),
),
],
);
To use this widget in your project, include the following import statement in your file.