[![Pub](https://img.shields.io/pub/v/miniplayer?color=2196F3)](https://pub.dev/packages/miniplayer) A lightweight flutter package to simplify the creation of a miniplayer by providing a builder function with the current height and percentage progress. The widget responds to tap and drag gestures and is highly customizable. **What is a miniplayer?** Miniplayers are commonly used in media applications like Spotify and Youtube. A miniplayer can be expanded and minified and remains on the screen when minified until dismissed by the user. See the demo below for an example. ## Demo ![demo](./example/demo_gif/demo.gif "demo") ## Usage ```dart Miniplayer( minHeight: 70, maxHeight: 370, builder: (height, percentage) { return Center( child: Text('$height, $percentage'), ); }, ), ``` ## Options
Parameter | Implementation | Demo |
---|---|---|
onDismiss |
Miniplayer(
onDismiss: () {
//If onDismiss is set,
//the miniplayer can be dismissed
//Handle onDismissed here
},
),
|
|
valueNotifier |
//Allows you to use a global ValueNotifier
//with the current progress.
//Can be used to hide the BottomNavigationBar.
final ValueNotifier
|