WOIStepper class
The is the stepper widget that has multiple variations based enwrapped in multiple constructor.
If only a stepper is required that has only icons then use WOIStepper.icons. This have the fields dedicated to custumize the icons in the widget.
Here is the small example for this:
Padding(
padding: const EdgeInsets.all(10),
child: WOIStepper.icons(
activeStateIndex: currentStepperIndex,
activeSeparatorWidget: Container(
height: 2,
color: Colors.black,
),
iconData: const [
Icons.home,
Icons.person,
Icons.check,
],
completedIconTheme: IconStepperItemStyle(
boxDecoration: const BoxDecoration(
color: Colors.black,
shape: BoxShape.circle,
),
iconThemeData: const IconThemeData(
color: Colors.white,
),
),
),
),
Furthure moving on to the a variation that include the icons and text which is WOIStepper.iconText. This provides the options to add text along with the icons while custumize the states for both widgets.
Here is a small example on how to use that:
Padding(
padding: const EdgeInsets.all(10),
child: WOIStepper.iconText(
activeStateIndex: currentStepperIndex,
activeSeparatorWidget: Container(
height: 2,
color: Colors.black,
),
textItemsList: const [
'Step1',
'Step2',
'Step3',
],
),
),
Moving on to the a variation that include the counters and text which is WOIStepper.counterText. This provides the options to add counter widget as a suffix along with the text while providing the custumization for all states. Here is a small example on how to use that:
Padding(
padding: const EdgeInsets.all(10),
child: WOIStepper.counterText(
activeStateIndex: currentStepperIndex,
activeSeparatorWidget: Container(
height: 2,
color: Colors.black,
),
textItemsList: const [
'Step1',
'Step2',
'Step3',
],
),
),
Lastly we have a variation which can be used to create your own version of stepper called WOIStepper.custom. This widget is so powerfull that it provides with the option to customize the whole stepper widget as much an however you want This breaks down to 3 states active, inactive and completed.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- WOIStepper
Constructors
-
WOIStepper.counterText({Key? key, required List<
String> textItemsList, Widget? activeSeparatorWidget, Widget? inactiveSeparatorWidget, required int activeStateIndex, EdgeInsets? itemsPadding, EdgeInsets? saperatorsPadding, EdgeInsets? backgroundPadding, BoxDecoration? backgroundDecorator, EdgeInsets? itemsMargin, EdgeInsets? counterPadding, EdgeInsets? counterMargin, Color? activeColor, Color? completedColor, Color? inactiveColor, List<String> ? subtextList, TextStyle? subtextStyle, TextStyle? textStyle, TextStyle? counterTextStyle, Axis axis = Axis.horizontal, double? height, double? width, EdgeInsets? textPadding}) - Creates an instance of WOIStepper with counters as suffix widgets.
-
WOIStepper.custom({Key? key, StepperStyle? completedState, StepperStyle? activeState, StepperStyle? inactiveState, required int activeStateIndex, required List<
String> textItemsList, Widget? activeSeparatorWidget, Widget? inactiveSeparatorWidget, EdgeInsets? itemsPadding, EdgeInsets? saperatorsPadding, EdgeInsets? backgroundPadding, BoxDecoration? backgroundDecorator, List<SuffixWidgetStepper> ? suffixWidgetItemsList, EdgeInsets? itemsMargin, BoxDecoration? itemActiveDecorator, BoxDecoration? itemInactiveDecorator, BoxDecoration? itemCompletedDecorator, List<String> ? subtextList, TextStyle? subtextStyle, Axis axis = Axis.horizontal, double? height, double? width, EdgeInsets? textPadding}) -
Creates an instance of WOIStepper.
const
-
WOIStepper.icons({Key? key, Widget? activeSeparatorWidget, Widget? inactiveSeparatorWidget, required int activeStateIndex, required List<
IconData> iconData, IconStepperItemStyle? activeIconTheme, IconStepperItemStyle? inactiveIconTheme, IconStepperItemStyle? completedIconTheme, EdgeInsets? itemsPadding, EdgeInsets? saperatorsPadding, EdgeInsets? backgroundPadding, BoxDecoration? backgroundDecorator, Axis axis = Axis.horizontal, EdgeInsets? itemsMargin, double? height, double? width}) - Creates an instance of WOIStepper as icons as their items.
-
WOIStepper.iconText({Key? key, required List<
String> textItemsList, Widget? activeSeparatorWidget, Widget? inactiveSeparatorWidget, required int activeStateIndex, EdgeInsets? itemsPadding, EdgeInsets? saperatorsPadding, EdgeInsets? backgroundPadding, BoxDecoration? backgroundDecorator, EdgeInsets? itemsMargin, List<Icon> ? iconList, Color? activeColor, Color? completedColor, Color? inactiveColor, Widget? completedIcon, Widget? activeIcon, Widget? inactiveIcon, TextStyle? textStyle, Axis axis = Axis.horizontal, double? height, double? width, EdgeInsets? textPadding}) - Creates an instance of WOIStepper as combinations for (optional) icons and text as their items.
Properties
- activeSeparatorWidget → Widget?
-
Widget to be used as a separator for active steps.
final
- activeState → StepperStyle?
-
Styling for the active state of the stepper.
final
- activeStateIndex → int
-
Index of the currently active step.
final
- axis → Axis
-
Axis along which the stepper should be oriented (default is horizontal).
final
- backgroundDecorator → BoxDecoration?
-
Decoration for the overall background of the stepper.
final
- backgroundPadding → EdgeInsets?
-
Padding for the overall background of the stepper.
final
- completedState → StepperStyle?
-
Styling for the completed state of the stepper.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Height of the stepper.
final
- inactiveSeparatorWidget → Widget?
-
Widget to be used as a separator for inactive steps.
final
- inactiveState → StepperStyle?
-
Styling for the inactive state of the stepper.
final
- itemActiveDecorator → BoxDecoration?
-
Decoration for the active item in the stepper.
final
- itemCompletedDecorator → BoxDecoration?
-
Decoration for the completed item in the stepper.
final
- itemInactiveDecorator → BoxDecoration?
-
Decoration for the inactive item in the stepper.
final
- itemsMargin → EdgeInsets?
-
Margin for the items in the stepper.
final
- itemsPadding → EdgeInsets?
-
Padding for the items in the stepper.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saperatorsPadding → EdgeInsets?
-
Padding for the separators in the stepper.
final
-
subtextList
→ List<
String> ? -
List of subtext associated with each step in the stepper.
final
- subtextStyle → TextStyle?
-
Style for the subtext in the stepper.
final
-
suffixWidgetItemsList
→ List<
SuffixWidgetStepper> ? -
List of suffix widgets associated with each step in the stepper.
final
-
textItemsList
→ List<
String> -
List of text items displayed in the stepper.
final
- textPadding → EdgeInsets?
-
Padding for the text items in the stepper.
final
- width → double?
-
Width of the stepper.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< WOIStepper> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited