polygon method

void polygon({
  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. double? borderRadius,
  16. double? width,
  17. int? side,
  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 polygon({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,
  double? borderRadius,
  double? width,
  int? side,
  bool? reverse,
  StrokeCap? strokeCap,
  Color? progressBackground,
  Gradient? progressBackgroundGradient,
  double? startRatio,
  BorderSide? borderSide,
  Gradient? foregroundGradient,
  Gradient? backgroundGradient,
  List<BoxShadow>? shadows}){
  if(_isDisposed){
    return;
  }
  PolygonProgress? polygonProgress;
  if(_buttonProgress is PolygonProgress){
    polygonProgress = _buttonProgress as PolygonProgress;
  }
  _buttonProgress = PolygonProgress(
    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??polygonProgress?.indeterminateText,
    indicatorRatio: indicatorRatio??polygonProgress?.indicatorRatio,
    size: size??polygonProgress?.size??5,
    width: width??polygonProgress?.width,
    side: side??polygonProgress?.side??3,
    borderRadius: borderRadius??polygonProgress?.borderRadius,
    reverse: reverse??polygonProgress?.reverse??false,
    strokeCap: strokeCap??polygonProgress?.strokeCap??StrokeCap.round,
    borderSide: borderSide??_buttonProgress.borderSide,
    progressBackground: progressBackground??polygonProgress?.progressBackground,
    progressBackgroundGradient: progressBackgroundGradient??polygonProgress?.progressBackgroundGradient,
    foregroundGradient: foregroundGradient??_buttonProgress.foregroundGradient,
    backgroundGradient: backgroundGradient??_buttonProgress.backgroundGradient,
    shadows: shadows??_buttonProgress.shadows,
  );
  notifyListeners();
}