animateToHeight method
Implementation
void animateToHeight(
{double? height, PanelState? state, Duration? duration}) {
if (height == null && state == null)
throw ("Miniplayer: One of the two parameters, height or status, is required.");
if (height != null && state != null)
throw ("Miniplayer: Only one of the two parameters, height or status, can be specified.");
ControllerData? valBefore = value;
if (state != null)
value = ControllerData(state.heightCode, duration);
else {
if (height! < 0) return;
value = ControllerData(height.round(), duration);
}
if (valBefore == value) notifyListeners();
}