loadingAnimation method

Widget loadingAnimation(
  1. BuildContext context, {
  2. double size = 24.0,
  3. bool light = false,
})

Implementation

Widget loadingAnimation(BuildContext context,
    {double size = 24.0, bool light = false}) {
  return SizedBox(
      width: (2 * size * 0.88),
      height: (2 * size * 0.88),
      child: Center(
        child: LoadingAnimationWidget.discreteCircle(
          color: light ? Colors.white : Theme.of(context).colorScheme.primary,
          secondRingColor: light
              ? Colors.white.darken(0.2)
              : Theme.of(context).colorScheme.primary.darken(),
          thirdRingColor: light
              ? Colors.white
              : Theme.of(context).colorScheme.primary.lighten(),
          size: size,
        ),
      ));
}