StepNumber constructor
const
StepNumber({
- Key? key,
- Widget? icon,
- VoidCallback? onPressed,
Creates a StepNumber.
Both parameters are optional. If icon
is provided, it replaces
the default step number. If onPressed
is provided, the step
becomes clickable.
Parameters:
icon
(Widget?): custom icon replacing step numberonPressed
(VoidCallback?): tap callback for interaction
Example:
StepNumber(
icon: Icon(Icons.person),
onPressed: () => jumpToStep(stepIndex),
);
Implementation
const StepNumber({
super.key,
this.icon,
this.onPressed,
});