rectangle method
void
rectangle({
- double? progress,
- int? progressReserve,
- ProgressType? progressType,
- Color? foreground,
- Color? background,
- bool? isProgressOpacityAnim,
- String? indeterminateText,
- double? indicatorRatio,
- TextStyle? textStyle,
- String? prefix,
- TextStyle? prefixStyle,
- String? suffix,
- TextStyle? suffixStyle,
- double? size,
- BorderRadius? borderRadius,
- double? width,
- double? height,
- bool? reverse,
- StrokeCap? strokeCap,
- Color? progressBackground,
- Gradient? progressBackgroundGradient,
- double? startRatio,
- BorderSide? borderSide,
- Gradient? foregroundGradient,
- Gradient? backgroundGradient,
- List<
BoxShadow> ? shadows,
改变矩形进度属性
Implementation
void rectangle({double? progress,
int? progressReserve,
ProgressType? progressType,
Color? foreground,
Color? background,
bool? isProgressOpacityAnim,
String? indeterminateText,
double? indicatorRatio,
TextStyle? textStyle,
String? prefix,
TextStyle? prefixStyle,
String? suffix,
TextStyle? suffixStyle,
double? size,
BorderRadius? borderRadius,
double? width,
double? height,
bool? reverse,
StrokeCap? strokeCap,
Color? progressBackground,
Gradient? progressBackgroundGradient,
double? startRatio,
BorderSide? borderSide,
Gradient? foregroundGradient,
Gradient? backgroundGradient,
List<BoxShadow>? shadows}){
if(_isDisposed){
return;
}
RectangleProgress? rectangleProgress;
if(_buttonProgress is RectangleProgress){
rectangleProgress = _buttonProgress as RectangleProgress;
}
_buttonProgress = RectangleProgress(
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,
indeterminateText: indeterminateText??rectangleProgress?.indeterminateText,
indicatorRatio: indicatorRatio??rectangleProgress?.indicatorRatio,
size: size??rectangleProgress?.size??5,
width: width??rectangleProgress?.width,
height: height??rectangleProgress?.height,
borderRadius: borderRadius??rectangleProgress?.borderRadius,
reverse: reverse??rectangleProgress?.reverse??false,
strokeCap: strokeCap??rectangleProgress?.strokeCap??StrokeCap.round,
borderSide: borderSide??_buttonProgress.borderSide,
progressBackground: progressBackground??rectangleProgress?.progressBackground,
progressBackgroundGradient: progressBackgroundGradient??rectangleProgress?.progressBackgroundGradient,
foregroundGradient: foregroundGradient??_buttonProgress.foregroundGradient,
backgroundGradient: backgroundGradient??_buttonProgress.backgroundGradient,
shadows: shadows??_buttonProgress.shadows,
);
notifyListeners();
}