ShimmerProgressBar class

A customizable progress bar widget with shimmer animation effect.

This widget provides a smooth progress bar with optional shimmer effect, percentage display, and full accessibility support.

Example usage:

ShimmerProgressBar(
  value: 0.75,
  height: 20.0,
  onProgressComplete: () => print('Progress completed!'),
)
Inheritance
Available extensions

Constructors

ShimmerProgressBar({Key? key, required double value, double height = 12.0, double borderRadius = 20.0, double shimmerWidth = 30.0, Duration shimmerDuration = const Duration(seconds: 2), Duration animationDuration = const Duration(milliseconds: 300), Color valueColor = Colors.green, Color backgroundColor = const Color(0xFFE0E0E0), Color percentageFontColor = const Color(0xFFFFFFFF), Color shimmerColor = const Color.fromARGB(80, 255, 255, 255), bool showShimmer = true, bool alignPercentageToTip = false, bool showPercentage = true, TextStyle? percentTextStyle, bool includeSemantics = true, String? semanticsLabel, VoidCallback? onProgressComplete, double minWidthForPercentage = 35.0, Widget percentageBuilder(BuildContext context, int percentage)?, bool respectReducedMotion = true})
const

Properties

alignPercentageToTip bool
Whether to align percentage text to the tip of progress
final
animationDuration Duration
Duration of progress animation in milliseconds
final
backgroundColor Color
Background color of the progress bar
final
borderRadius double
Border radius for rounded corners
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the progress bar
final
includeSemantics bool
Whether to include semantic information for accessibility
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minWidthForPercentage double
Minimum width required to show percentage text
final
onProgressComplete VoidCallback?
Callback fired when progress reaches 100%
final
percentageBuilder Widget Function(BuildContext context, int percentage)?
Custom widget builder for percentage display
final
percentageFontColor Color
Color of the percentage text
final
percentTextStyle TextStyle?
Custom text style for percentage
final
respectReducedMotion bool
Whether to respect system reduced motion settings
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
Custom semantic label for accessibility
final
shimmerColor Color
Color of the shimmer effect
final
shimmerDuration Duration
Duration of shimmer animation in seconds
final
shimmerWidth double
Width of the shimmer effect
final
showPercentage bool
Whether to show percentage text
final
showShimmer bool
Whether to show shimmer animation
final
value double
The progress value between 0.0 and 1.0
final
valueColor Color
Color of the progress fill
final

Methods

copyWith({double? value, double? height, Color? valueColor, Color? backgroundColor, bool? showShimmer, VoidCallback? onProgressComplete}) ShimmerProgressBar

Available on ShimmerProgressBar, provided by the ShimmerProgressBarExtension extension

Creates a copy of this progress bar with updated values
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ShimmerProgressBar>
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, int wrapWidth = 65}) 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