MotionLoader.minimal constructor
MotionLoader.minimal({
- Key? key,
- required MotionMinimalStyle style,
- Color? color,
- double size = 50.0,
- double strokeWidth = 3.0,
Minimal Theme Category: Lemniscate drawing paths, vectors & morphing layers.
Implementation
factory MotionLoader.minimal({
Key? key,
required MotionMinimalStyle style,
Color? color,
double size = 50.0,
double strokeWidth = 3.0,
}) {
return MotionLoader._internal(
key: key,
color: color,
size: size,
strokeWidth: strokeWidth,
builder: (context) {
final activeColor = color ?? Theme.of(context).primaryColor;
switch (style) {
case MotionMinimalStyle.lineDraw:
return MotionLineDrawLoader(
color: activeColor,
size: size,
strokeWidth: strokeWidth,
);
case MotionMinimalStyle.morphShape:
return MotionMorphShapeLoader(
color: activeColor,
size: size,
);
case MotionMinimalStyle.infiniteRibbon:
return MotionInfiniteRibbonLoader(
color: activeColor,
size: size,
);
}
},
);
}