MotionLoader.luxury constructor

MotionLoader.luxury({
  1. Key? key,
  2. required MotionLuxuryStyle style,
  3. Color? color,
  4. double size = 50.0,
})

Luxury Theme Category: diamond sparks, silk curves, watch gear mechanical ticks.

Implementation

factory MotionLoader.luxury({
  Key? key,
  required MotionLuxuryStyle style,
  Color? color,
  double size = 50.0,
}) {
  return MotionLoader._internal(
    key: key,
    color: color,
    size: size,
    builder: (context) {
      final activeColor = color ?? Theme.of(context).primaryColor;
      switch (style) {
        case MotionLuxuryStyle.diamondSpark:
          return MotionDiamondSparkLoader(
            color: activeColor,
            size: size,
          );
        case MotionLuxuryStyle.silkFlow:
          return MotionSilkFlowLoader(
            color: activeColor,
            size: size,
          );
        case MotionLuxuryStyle.goldSweep:
          return MotionGoldSweepLoader(
            color: activeColor,
            size: size,
          );
        case MotionLuxuryStyle.premiumWatch:
          return MotionPremiumWatchLoader(
            color: activeColor,
            size: size,
          );
      }
    },
  );
}