useCircleProgress method

void useCircleProgress({
  1. Key? key,
  2. Color? backgroundColor,
  3. Color? color,
  4. Animation<Color?>? valueColor,
  5. double strokeWidth = 4.0,
  6. String? semanticsLabel,
  7. String? semanticsValue,
})

Implementation

void useCircleProgress({
  Key? key,
  Color? backgroundColor,
  Color? color,
  Animation<Color?>? valueColor,
  double strokeWidth = 4.0,
  String? semanticsLabel,
  String? semanticsValue,
}) =>
    loadingBuilder = (
      BuildContext context,
      Widget child,
      ImageChunkEvent? loadingProgress,
    ) {
      if (loadingProgress == null) return child;

      return Center(
        child: CircularProgressIndicator(
          key: key,
          backgroundColor: backgroundColor,
          color: color,
          valueColor: valueColor,
          strokeWidth: strokeWidth,
          semanticsLabel: semanticsLabel,
          semanticsValue: semanticsValue,
          value: loadingProgress.expectedTotalBytes != null
              ? loadingProgress.cumulativeBytesLoaded /
                  loadingProgress.expectedTotalBytes!
              : null,
        ),
      );
    };