CoolStepper is a widget that displays a step by step sequence of operations. it could be helpful for a form wizard or onboarding.
Usage
To use this package, add cool_stepper as a dependency in your pubspec.yaml file.
And add this import to your file.
import 'package:cool_stepper/cool_stepper.dart';
Screenshots
Example
CoolStepper(
onCompleted: () {},
steps: List<CoolStep>[
CoolStep(
title: "Basic Information",
subtitle: "Please fill some of the basic information to get started",
content: Container()
),
],
);
For each step, return a null, if you want the validation to pass or a String message which would be displayed if you set the showErrorSnackbar attribute to true.
validation: () {
if (!_formKey.currentState!.validate()) {
return'Fill form correctly';
}
returnnull;
},
CoolStepper Class
Attribute
Data type
Description
Default Value
onCompleted
Void Function()
@required - A function that is triggers when all steps have been completed
A List of string that when supplied will override 'backText'. Must be one less than the number of steps since for the first step, the backText won't be visible
null
nextTextList
List
A List of string that when supplied will override 'nextText'Must be one less than the number of steps since the 'finalText' attribute is able to set the value for the final step's next button