Version 0.2.0: Add backgroundColor property
This commit is contained in:
parent
dd7cb5f9b9
commit
ddf09936fa
|
@ -1,3 +1,7 @@
|
|||
## [0.2.0]
|
||||
|
||||
* Added backgroundColor property
|
||||
|
||||
## [0.1.2]
|
||||
|
||||
* Bug fixes.
|
||||
|
|
|
@ -12,6 +12,7 @@ class Miniplayer extends StatefulWidget {
|
|||
final MiniplayerBuilder builder;
|
||||
final Curve curve;
|
||||
final double elevation;
|
||||
final Color backgroundColor;
|
||||
|
||||
const Miniplayer({
|
||||
Key key,
|
||||
|
@ -20,6 +21,7 @@ class Miniplayer extends StatefulWidget {
|
|||
@required this.builder,
|
||||
this.curve = Curves.easeInQuart,
|
||||
this.elevation = 0,
|
||||
this.backgroundColor = const Color(0x70000000),
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
@ -83,8 +85,10 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
|||
if (_percentage > 0)
|
||||
GestureDetector(
|
||||
onTap: () => animateToHeight(widget.minHeight),
|
||||
child: Container(
|
||||
color: Colors.black.withOpacity(_percentage * 0.5)),
|
||||
child: Opacity(
|
||||
opacity: _percentage,
|
||||
child: Container(color: widget.backgroundColor),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: miniplayer
|
||||
description: Miniplayer for Flutter
|
||||
version: 0.1.2
|
||||
description: A lightweight flutter package providing a miniplayer widget which resizes according to drag gestures and returns a builder function with the current height and percentage progress.
|
||||
version: 0.2.0
|
||||
homepage: https://www.peterscode.dev
|
||||
repository: https://github.com/peterscodee/miniplayer
|
||||
|
||||
|
|
Loading…
Reference in New Issue