circular method

void circular({
  1. double? progress,
  2. int? progressReserve,
  3. ProgressType? progressType,
  4. Color? foreground,
  5. Color? background,
  6. Color? circularBackground,
  7. bool? isProgressOpacityAnim,
  8. TextStyle? textStyle,
  9. String? prefix,
  10. TextStyle? prefixStyle,
  11. String? suffix,
  12. TextStyle? suffixStyle,
  13. double? size,
  14. BorderRadius? borderRadius,
  15. double? radius,
  16. double? ratio,
  17. bool? isArrow,
  18. bool? reverse,
  19. StrokeCap? strokeCap,
  20. double? startAngle,
  21. double? sweepAngle,
  22. BorderSide? borderSide,
  23. Gradient? circularBackgroundGradient,
  24. Gradient? foregroundGradient,
  25. Gradient? backgroundGradient,
  26. 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();
}