dispose method
Dispose of the widget.
Implementation
@override
void dispose() {
super.dispose();
stopSounds();
final loader = context.sourceLoader;
for (final menuItem in widget.menuItems) {
final sound = menuItem.earcon;
if (sound != null) {
loader.disposeSound(sound);
}
}
final music = widget.music;
if (music != null) {
loader.disposeSound(music);
}
}