loadingView2 method

Widget loadingView2({
  1. Brightness? brightness,
  2. Color? color,
})

Implementation

Widget loadingView2({Brightness? brightness, Color? color}) {
  final iosWidget = Theme(
    data: ThemeData(
      cupertinoOverrideTheme:
          CupertinoThemeData(brightness: brightness ?? Brightness.dark),
    ),
    child: CupertinoActivityIndicator(radius: 15, color: color),
  );

  final androidWidget = SizedBox(
    width: 30,
    height: 30,
    child: FittedBox(
      child: CircularProgressIndicator(
        strokeWidth: 3,
        valueColor: AlwaysStoppedAnimation<Color>(color ?? Colors.white),
      ),
    ),
  );

  return Center(
    child: Utils.isAndroid ? androidWidget : iosWidget,
  );
}