circular method
void
circular({
- double? progress,
- int? progressReserve,
- ProgressType? progressType,
- Color? foreground,
- Color? background,
- Color? circularBackground,
- bool? isProgressOpacityAnim,
- TextStyle? textStyle,
- String? prefix,
- TextStyle? prefixStyle,
- String? suffix,
- TextStyle? suffixStyle,
- double? size,
- BorderRadius? borderRadius,
- double? radius,
- double? ratio,
- bool? isArrow,
- bool? reverse,
- StrokeCap? strokeCap,
- double? startAngle,
- double? sweepAngle,
- BorderSide? borderSide,
- Gradient? circularBackgroundGradient,
- Gradient? foregroundGradient,
- Gradient? backgroundGradient,
- List<
BoxShadow> ? shadows,
改变圆形进度条属性
Implementation
void circular({double? progress,
int? progressReserve,
ProgressType? progressType,
Color? foreground,
Color? background,
Color? circularBackground,
bool? isProgressOpacityAnim,
TextStyle? textStyle,
String? prefix,
TextStyle? prefixStyle,
String? suffix,
TextStyle? suffixStyle,
double? size,
BorderRadius? borderRadius,
double? radius,
double? ratio,
bool? isArrow,
bool? reverse,
StrokeCap? strokeCap,
double? startAngle,
double? sweepAngle,
BorderSide? borderSide,
Gradient? circularBackgroundGradient,
Gradient? foregroundGradient,
Gradient? backgroundGradient,
List<BoxShadow>? shadows}){
if(_isDisposed){
return;
}
CircularProgress? circularProgress;
if(_buttonProgress is CircularProgress){
circularProgress = _buttonProgress as CircularProgress;
}
_buttonProgress = CircularProgress(
progress: progress??_buttonProgress.progress,
progressReserve: progressReserve??_buttonProgress.progressReserve,
progressType: progressType??_buttonProgress.progressType,
foreground: foreground??_buttonProgress.foreground,
background: background??_buttonProgress.background,
circularBackground: circularBackground??circularProgress?.circularBackground,
isProgressOpacityAnim: isProgressOpacityAnim??_buttonProgress.isProgressOpacityAnim,
textStyle: textStyle??_buttonProgress.textStyle,
prefix: prefix??_buttonProgress.prefix,
prefixStyle: prefixStyle??_buttonProgress.prefixStyle,
suffix: suffix??_buttonProgress.suffix,
suffixStyle: suffixStyle??_buttonProgress.suffixStyle,
size: size??circularProgress?.size??5,
borderRadius: borderRadius??circularProgress?.borderRadius,
radius: radius??circularProgress?.radius,
ratio: ratio??circularProgress?.ratio,
isArrow: isArrow??circularProgress?.isArrow,
reverse: reverse??circularProgress?.reverse??false,
strokeCap: strokeCap??circularProgress?.strokeCap??StrokeCap.round,
startAngle: startAngle??circularProgress?.startAngle,
sweepAngle: sweepAngle??circularProgress?.sweepAngle,
borderSide: borderSide??_buttonProgress.borderSide,
circularBackgroundGradient: circularBackgroundGradient??circularProgress?.circularBackgroundGradient,
foregroundGradient: foregroundGradient??_buttonProgress.foregroundGradient,
backgroundGradient: backgroundGradient??_buttonProgress.backgroundGradient,
shadows: shadows??_buttonProgress.shadows,
);
notifyListeners();
}