dxvid-pts / miniplayer

A lightweight flutter package to simplify the creation of a miniplayer.
https://pub.dev/packages/miniplayer
MIT License
106 stars 79 forks source link

How to open the miniplayer with maxHeight by default ? #16

Closed toklive closed 3 years ago

toklive commented 3 years ago

First of all, great plugin and exactly I was looking for :)

I have a requirement of whenever I click on a button in a page, I need to open the mini-player in full height? Any idea how to achieve this?

Current behavior is...when I click on it by default it is showing the mini-player with the minimum height. Thanks for your help,

static const double _playerMinHeight = 70.0;

// using Getx for the state management Obx( () => !_videoController.isSessionInProgress.value ? const SizedBox.shrink() : Miniplayer( controller: _videoController.miniPlayerController, minHeight: _playerMinHeight, maxHeight: MediaQuery.of(context).size.height, builder: (height, percentage) { if (percentage > 0.10) return VideoView(); else return Text('mini'); }), ),

toklive commented 3 years ago

nevermind fixed it using the valuenotified mentioned here : https://github.com/peterscodee/miniplayer/issues/4