configLoad static method

void configLoad(
  1. {Widget? indicator,
  2. Widget? success,
  3. Widget? error,
  4. Widget? info,
  5. Color? progressColor,
  6. Color? backgroundColor,
  7. Color? indicatorColor,
  8. Color? textColor}
)

Implementation

static void configLoad(
    {Widget? indicator,
    Widget? success,
    Widget? error,
    Widget? info,
    Color? progressColor,
    Color? backgroundColor,
    Color? indicatorColor,
    Color? textColor}) {
  WidgetsFlutterBinding.ensureInitialized();
  EasyLoading.instance
    ..indicatorType = EasyLoadingIndicatorType.fadingCircle
    ..loadingStyle = EasyLoadingStyle.custom
    ..maskType = EasyLoadingMaskType.black
    ..indicatorSize = 45.0
    ..radius = 10.0
    ..progressColor = progressColor ?? Colors.white
    ..backgroundColor = backgroundColor ?? Colors.black
    ..indicatorColor = indicatorColor ?? Colors.white
    ..textColor = textColor ?? Colors.pink
    ..maskColor = Colors.blue.withOpacity(0.5)
    ..userInteractions = false
    ..dismissOnTap = false
    ..indicatorWidget = indicator ??
        const SizedBox(
          width: 150,
          child: SpinKitWave(
            color: Colors.white,
            size: 50.0,
          ),
        )
    ..successWidget = success ??
        const Icon(
          Icons.check,
          color: Colors.green,
        )
    ..errorWidget = error ??
        const Icon(
          Icons.error,
          color: Colors.red,
        )
    ..infoWidget = info ??
        const Icon(
          Icons.info,
          color: Colors.blue,
        );
}