rectangle method

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