MotionLoader.liquid constructor
MotionLoader.liquid({
- Key? key,
- required MotionLiquidStyle style,
- Color? color,
- double size = 50.0,
Liquid Theme Category: Contains 3 advanced fluid dynamics simulation styles.
Implementation
factory MotionLoader.liquid({
Key? key,
required MotionLiquidStyle 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 MotionLiquidStyle.lavaLamp:
return MotionLavaLampLoader(
color: activeColor,
size: size,
);
case MotionLiquidStyle.waterDrop:
return MotionWaterRippleLoader(
color: activeColor,
size: size,
);
case MotionLiquidStyle.inkSpread:
return MotionInkSpreadLoader(
color: activeColor,
size: size,
);
}
},
);
}