MotionLoader.audio constructor
MotionLoader.audio({
- Key? key,
- required MotionAudioStyle style,
- Color? color,
- double size = 50.0,
Audio Theme Category: equalizer sound bars, spinning records & frequency curves.
Implementation
factory MotionLoader.audio({
Key? key,
required MotionAudioStyle 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 MotionAudioStyle.equalizer:
return MotionEqualizerLoader(
color: activeColor,
size: size,
);
case MotionAudioStyle.vinyl:
return MotionVinylLoader(
color: activeColor,
size: size,
);
case MotionAudioStyle.beatWave:
return MotionBeatWaveLoader(
color: activeColor,
size: size,
);
}
},
);
}