LinearProgressBar class
create_user: zhengzaihong email:1096877329@qq.com create_date: 2026-02-11 create_time: 17:26 describe: 线性进度条组件 - 支持动画、渐变、自定义样式 Linear Progress Bar Component - Supports animation, gradient, and custom styles
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LinearProgressBar
- Available extensions
Constructors
- LinearProgressBar({Key? key, Color fillColor = Colors.transparent, double percent = 0.0, double lineHeight = 5.0, double? width, Color? backgroundColor, LinearGradient? linearGradientBackgroundColor, LinearGradient? linearGradient, Color? progressColor, bool animation = false, int animationDuration = 500, bool animateFromLastPercent = false, bool isRTL = false, Widget? leading, Widget? trailing, Widget? center, bool addAutomaticKeepAlive = true, Radius? barRadius, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 10.0), MainAxisAlignment alignment = MainAxisAlignment.start, MaskFilter? maskFilter, bool clipLinearGradient = false, Curve curve = Curves.linear, bool restartAnimation = false, VoidCallback? onAnimationEnd, Widget? widgetIndicator, Color? progressBorderColor})
Properties
- addAutomaticKeepAlive → bool
-
自动保持存活 / Add automatic keep alive
final
- alignment → MainAxisAlignment
-
对齐方式 / Alignment
final
- animateFromLastPercent → bool
-
从上次进度开始动画 / Animate from last percent
final
- animation → bool
-
是否启用动画 / Enable animation
final
- animationDuration → int
-
动画时长(毫秒) / Animation duration (milliseconds)
final
- backgroundColor → Color
-
背景颜色 / Background color
no setter
- barRadius → Radius?
-
圆角半径 / Bar radius
final
- center → Widget?
-
中心组件 / Center widget
final
- clipLinearGradient → bool
-
裁剪渐变 / Clip linear gradient
final
- curve → Curve
-
动画曲线 / Animation curve
final
- fillColor → Color
-
容器填充颜色 / Container fill color
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRTL → bool
-
是否RTL布局 / Is RTL layout
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
前置组件 / Leading widget
final
- linearGradient → LinearGradient?
-
进度渐变色 / Progress gradient
final
- linearGradientBackgroundColor → LinearGradient?
-
背景渐变色 / Background gradient
final
- lineHeight → double
-
进度条高度 / Progress bar height
final
- maskFilter → MaskFilter?
-
遮罩滤镜 / Mask filter
final
- onAnimationEnd → VoidCallback?
-
动画结束回调 / Animation end callback
final
- padding → EdgeInsets
-
内边距 / Padding
final
- percent → double
-
进度百分比 / Progress percentage
final
- progressBorderColor → Color?
-
进度边框颜色 / Progress border color
final
- progressColor → Color
-
进度颜色 / Progress color
no setter
- restartAnimation → bool
-
重启动画 / Restart animation
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trailing → Widget?
-
后置组件 / Trailing widget
final
- widgetIndicator → Widget?
-
自定义指示器 / Custom indicator widget
final
- width → double?
-
进度条宽度 / Progress bar width
final
Methods
-
blurred(
{double blur = 5, Color blurColor = Colors.white, BorderRadius? borderRadius, double colorOpacity = 0.5, Widget? overlay, AlignmentGeometry alignment = Alignment.center}) → Blur -
Available on Widget, provided by the BlurExtension extension
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _LinearProgressBarState -
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
-
frosted(
{double blur = 5, Color frostColor = Colors.white, AlignmentGeometry alignment = Alignment.center, double? height, double? width, double frostOpacity = 0.0, BorderRadius? borderRadius, EdgeInsetsGeometry padding = EdgeInsets.zero}) → Blur -
Available on Widget, provided by the FrostExtension extension
-
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