MotionLoader.gaming constructor
MotionLoader.gaming({
- Key? key,
- required MotionGamingStyle style,
- Color? color,
- double size = 50.0,
- bool glow = true,
Gaming Theme Category: RPG runic fires, pixel scanlines, XP arcs.
Implementation
factory MotionLoader.gaming({
Key? key,
required MotionGamingStyle style,
Color? color,
double size = 50.0,
bool glow = true,
}) {
return MotionLoader._internal(
key: key,
color: color,
size: size,
builder: (context) {
final activeColor = color ?? Theme.of(context).primaryColor;
switch (style) {
case MotionGamingStyle.xpProgress:
return MotionXpProgressLoader(
color: activeColor,
size: size,
glow: glow,
);
case MotionGamingStyle.bossFight:
return MotionBossFightLoader(
color: activeColor,
size: size,
glow: glow,
);
case MotionGamingStyle.pixel:
return MotionPixelLoader(
color: activeColor,
size: size,
);
}
},
);
}