WOISectionBar class

This is a variation of the progress bar called a section bar. The WOISectionBar can be divided into multiple different sections that jointly tracks the progress and completion of a single task. Each section as defined by the user can track the progress of all hierarchical steps needed to achieve a goal. The section bar takes width and a list called sections as required parameters. Sections can not contain a value of 0 and currentProgress cannot be greater that the sum of all elements in the section list.

Here is an example of the WOISectionBar

const SizedBox(
      child: WOISectionBar(
  width: 375,
initialValue: 0,
sections: [4, 10, 6, 8],
currentProgress: 3,
tiltValue: 0,
sectionSpacing: 0,
barBottomPadding: 0,
prefixAndSuffixText: true,
borderedSections: true,
inactiveBarColor: Colors.white,
activeBarColor: Colors.red,
borderColor: Colors.orange,
borderWidth: 3,
  ),
),

The WOISectionBar takes width and a list of sections as required parameters and offers a wide range of parameters that fully customize the widget to fulfill differing needs.

Inheritance

Constructors

WOISectionBar({Key? key, required double width, required List<int> sections, bool borderedSections = false, Color borderColor = Colors.black, double borderWidth = 1, bool prefixAndSuffixText = true, double barHeight = 15, BoxShadow progressIndicatorShadow = const BoxShadow(color: Colors.black, blurRadius: 10, spreadRadius: 0), int currentProgress = 0, Color progressIndicatorColor = Colors.white, double progressIndicatorBorderRadius = 20, double barBottomPadding = 0, double sectionSpacing = 5, double progressIndicatorSize = 25, required int initialValue, Color inactiveBarColor = Colors.grey, Color activeBarColor = Colors.blueGrey, TextStyle fontStyle = const TextStyle(fontWeight: FontWeight.w400, fontSize: 18, color: Colors.grey), double tiltValue = 5, double textPadding = 5})
The WOISectionBar can be divided into multiple different sections that jointly tracks the progress and completion of a single task. Each section as defined by the user can track the progress of all hierarchical steps needed to achieve a goal. The section bar takes width and a list called sections as required parameters. Sections can not contain a value of 0 and currentProgress cannot be greater that the sum of all elements in the section list.

Properties

activeBarColor Color
The color of the sections being tracked.
final
barBottomPadding double
This field is used in case the bar height is changed. It is used to fix the alignment of the of the WOISectionBar and its progress indicator.
final
barHeight double
This modifies the hight of the bar of the WOISectionBar.
final
borderColor Color
Modifies the color of the border if the borderedSections boolean variable is set to true.
final
borderedSections bool
Boolean variable to check if the sections need to have borders or not. Default value is false.
final
borderWidth double
Modifies the width of the border if the borderedSections boolean variable is set to true.
final
currentProgress int
This is the tracking metric of WOISectionBar. This value cannot be more than the sum of values of sections list.
final
fontStyle TextStyle
The font style of the prefix, suffix and progress indicator text.
final
hashCode int
The hash code for this object.
no setterinherited
inactiveBarColor Color
The color of the sections on which are not being tracked.
final
initialValue int
The starting progress value. By default the initial value is 0.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
prefixAndSuffixText bool
Boolean variable to check if the prefix and suffix text is needed to be displayed. Default value is true.
final
progressIndicatorBorderRadius double
This is to change the border radius of the progress indicator which can give the widget a more squarer shape.
final
progressIndicatorColor Color
The color of the progress indicator.
final
progressIndicatorShadow BoxShadow
This is used to modify or remove the shadow of the progress indicator.
final
progressIndicatorSize double
This is used to change the size of the progress indicator.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sections List<int>
This list takes number of units of space and progress that each section will take. Example 4, 10, 6, 8 will create 4 sections where first section will go from 0-4 and second will go from 5-14 all the way up to 28 which is the final value. The list cannot accept 0 as a value. Hard refresh is recommended when this list is changed.
final
sectionSpacing double
This field is only required in case the tilt value is 0. It changes the spacing between each section.
final
textPadding double
Padding between the WOISectionBar and the prefix and suffix text and also between the progress indicator and its text.
final
tiltValue double
Tilt value controls the tilt of the left and the right borders of the sections. Negative value will give a left tilt and positive value will give a right tilt.
final
width double
Width of the WOISectionBar is a required field.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<WOISectionBar>
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