Skip to content

Commit

Permalink
stepper example docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecoomber committed Oct 18, 2024
1 parent a624726 commit 76cff55
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/src/components/stepper/stepper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ import '../../../zeta_flutter.dart';
/// steps. Steppers are particularly useful in the case of forms where one step
/// requires the completion of another one, or where multiple steps need to be
/// completed in order to submit the whole form.
///
/// The steppers current step is managed through the [currentStep] property.
/// To change it, store this value in state and change it with the [onStepTapped] callback.
/// The stored value can then be used to update content depending on the selected step.
///
/// ```dart
/// ZetaStepper(
/// steps: [
/// ZetaStep(title: Text('Step 1')),
/// ZetaStep(title: Text('Step 2')),
/// ZetaStep(title: Text('Step 3')),
/// ],
/// currentStep: currentStep,
/// onStepTapped: (step) {
/// setState(() {
/// currentStep = step;
/// });
/// },
/// )
/// ```
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=3420-67488&node-type=canvas&m=dev
Expand Down

0 comments on commit 76cff55

Please sign in to comment.