diff --git a/README.md b/README.md index b3abdfb..dc88587 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ [![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. +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(e.g. Spotify, 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 @@ -19,7 +22,47 @@ Miniplayer( }, ), ``` -#### Usage without BottomNavigationBar + +##Options + +
onDismiss | +
+
+Miniplayer(
+ onDismiss: () {
+ //If onDismiss is set,
+ //the miniplayer can be dismissed
+ //Handle onDismissed here e.g.
+ },
+),
+
+ |
+ + + | +
onDismiss | +
+
+ Miniplayer(
+ onDismiss: () {
+ //If onDismiss is set,
+ //the miniplayer can be dismissed
+ //Handle onDismissed here e.g.
+ },
+ ),
+
+ |
+ + + | +