easy_stepper 0.2.0 easy_stepper: ^0.2.0 copied to clipboard
A fully customizable, beautiful and easy to use stepper widget. It help you to show or collect information from users using organized steps.
About #
A fully customizable, beautiful and easy to use stepper widgets with different variations.
Description #
The stepper widgets help you to show or collect information from users using organized steps.
Install #
In the pubspec.yaml
of your flutter project, add the following dependency:
dependencies:
easy_stepper: <latest_version>
In your library add the following import:
import 'package:easy_stepper/easy_stepper.dart';
Getting started #
-
Simply import
package:easy_stepper/easy_stepper.dart
. -
Important: The
direction
argument controls whether the stepper is displayed horizontally or vertically. A horizontal Stepper can be wrapped within a Column with no issues. However, if wrapped within a row, it must also be wrapped within the built-in Expanded widget. The same applies to the vertical Stepper. -
Validation: To enable validation before the next step is reached, set the
steppingEnabled
property to an appropriate value in aStatefulWidget
. -
Controlling Steppers: All steppers are controlled using the
activeStep
property. You can control a stepper by tapping individual steps.- See examples here.
-
To customize the color, border, etc., wrap a stepper widget inside a
Container
and specify it'sdecoration
argument.
Example:
EasyStepper(
activeStep: activeStep,
lineLength: 90,
lineType: LineType.normal,
steps: const [
EasyStep(
icon: Icon(CupertinoIcons.cart),
activeIcon: Icon(CupertinoIcons.cart),
finishIcon: Icon(Icons.check_circle_outline_rounded),
title: 'Cart',
),
EasyStep(
icon: Icon(CupertinoIcons.info),
activeIcon: Icon(CupertinoIcons.info),
title: 'Address',
),
EasyStep(
icon: Icon(CupertinoIcons.cart_fill_badge_plus),
activeIcon: Icon(CupertinoIcons.cart_fill_badge_plus),
title: 'Checkout',
),
EasyStep(
icon: Icon(CupertinoIcons.money_dollar),
activeIcon: Icon(CupertinoIcons.money_dollar),
title: 'Payment',
),
EasyStep(
icon: Icon(Icons.file_present_rounded),
activeIcon: Icon(Icons.file_present_rounded),
title: 'Order Details',
),
EasyStep(
icon: Icon(Icons.check_circle_outline),
activeIcon: Icon(Icons.check_circle_outline),
title: 'Finish',
),
],
onStepReached: (index) => setState(() => activeStep = index),
),
Features #
Simple to use icon stepper widget, wherein each icon defines a step. Hence, the total number of icons represents the total number of available steps. See Example.
Horizontal-Stepper #
- With Title:
- Without Title:
- With Line Text:
Vertical-Stepper #
Contributions #
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.
Connect with me #
Support #
-
Please Like to support!