Closed vishal-akg closed 4 years ago
I have tried a workaround this-
_playerExpandProgress = ValueNotifier({max height of device});
But then the issue arises because you don't consider its initial value in initState method. you have simply assumed it to be always _dragHeight minHeight;
I made these following changes;-
if (widget.valueNotifier == null) { heightNotifier = ValueNotifier(widget.minHeight); _dragHeight = min.maxHeight; } else { heightNotifier = widget.valueNotifier; _dragHeight = widget.valueNotifer.value; }
Just review it please.
You can achieve that through providing a custom ValueNotifier
:
final ValueNotifier<double> customValueNotifier =
ValueNotifier(INITIAL_HEIGHT);
Miniplayer(
valueNotifier: customValueNotifier,
),
I'm not completely convinced that it is required to add a new parameter as I don't want the list to get messy over time. Do you still think we should add a new parameter?
yes I am using valueNotifier to initially show miniplayer in expanded state, but then on drag down it doesn't work as expected, First drag down gesture it won't minimise.
Ok, I'll take a look tomorrow.
Instead of having always start from min snap position, there should be an option to customise initial snap position. That can be anything in between max and min.