linear method
void
linear({
- double? progress,
- int? progressReserve,
- ProgressType? progressType,
- Color? foreground,
- Color? background,
- bool? isTextInner,
- bool? isTextFollowed,
- bool? isProgressOpacityAnim,
- TextStyle? textStyle,
- String? prefix,
- TextStyle? prefixStyle,
- String? suffix,
- TextStyle? suffixStyle,
- double? height,
- BorderRadius? borderRadius,
- double? width,
- double? padding,
- double? indicatorRatio,
- bool? reverse,
- BorderSide? borderSide,
- Gradient? foregroundGradient,
- Gradient? backgroundGradient,
- List<
BoxShadow> ? shadows,
改变线性进度条属性
Implementation
void linear({
double? progress,
int? progressReserve,
ProgressType? progressType,
Color? foreground,
Color? background,
bool? isTextInner,
bool? isTextFollowed,
bool? isProgressOpacityAnim,
TextStyle? textStyle,
String? prefix,
TextStyle? prefixStyle,
String? suffix,
TextStyle? suffixStyle,
double? height,
BorderRadius? borderRadius,
double? width,
double? padding,
double? indicatorRatio,
bool? reverse,
BorderSide? borderSide,
Gradient? foregroundGradient,
Gradient? backgroundGradient,
List<BoxShadow>? shadows
}){
if(_isDisposed){
return;
}
LinearProgress? linearProgress;
if(_buttonProgress is LinearProgress){
linearProgress = _buttonProgress as LinearProgress;
}
_buttonProgress = LinearProgress(
progress: progress??_buttonProgress.progress,
progressReserve: progressReserve??_buttonProgress.progressReserve,
progressType: progressType??_buttonProgress.progressType,
foreground: foreground??_buttonProgress.foreground,
background: background??_buttonProgress.background,
isProgressOpacityAnim: isProgressOpacityAnim??_buttonProgress.isProgressOpacityAnim,
textStyle: textStyle??_buttonProgress.textStyle,
prefix: prefix??_buttonProgress.prefix,
prefixStyle: prefixStyle??_buttonProgress.prefixStyle,
suffix: suffix??_buttonProgress.suffix,
suffixStyle: suffixStyle??_buttonProgress.suffixStyle,
height: height??linearProgress?.height??10,
borderRadius: borderRadius??linearProgress?.borderRadius,
width: width??linearProgress?.width,
padding: padding??linearProgress?.padding??5,
indicatorRatio: indicatorRatio??linearProgress?.indicatorRatio??5,
reverse: reverse??linearProgress?.reverse??false,
isTextInner: isTextInner??linearProgress?.isTextInner??true,
isTextFollowed: isTextFollowed??linearProgress?.isTextFollowed??true,
borderSide: borderSide??_buttonProgress.borderSide,
foregroundGradient: foregroundGradient??_buttonProgress.foregroundGradient,
backgroundGradient: backgroundGradient??_buttonProgress.backgroundGradient,
shadows: shadows??_buttonProgress.shadows,
);
notifyListeners();
}