dynamic_stepper 0.0.4 copy "dynamic_stepper: ^0.0.4" to clipboard
dynamic_stepper: ^0.0.4 copied to clipboard

Ability to dynamically create or remove steps in Material Stepper.

dynamic_stepper #

Ability to dynamically create or remove steps in Material Stepper.

The solution was found in the following question: https://stackoverflow.com/a/52929474/6845731

Credits: https://github.com/sanket143

Features #

Getting started #

Just add the following import where it's needed:

import 'package:dynamic_stepper/dynamic_stepper.dart';

Usage #

Replace the original Stepper with DynamicStepper:

    final steps = [
        DynamicStep(
            title: const Text('Step 1 title'),
            content: Container(
            alignment: Alignment.centerLeft,
            child: const Text('Content for Step 1'),
            ),
        ),
        const DynamicStep(
            title: Text('Step 2 title'),
            content: Text('Content for Step 2'),
        ),
        ];
    //...
    DynamicStepper(
        currentStep: _index,
        onStepCancel: () {
        // Handle cancel
        },
        onStepContinue: () {
        // Handle continue
        },
        onStepTapped: (int index) {
        // Handle tapped
        },
        steps: steps,
    )

NOTE: The name of the properties has been replaced to avoid conflicts with the original Stepper, so the Dynamic prefix has been added.

DynamicStepper DynamicStep DynamicStepType ...

Additional information #

Visit repository if you have questions, issues or more info.

5
likes
160
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

Ability to dynamically create or remove steps in Material Stepper.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on dynamic_stepper