Add duration property
This commit is contained in:
parent
897d115235
commit
0fca3c3ae4
|
@ -11,6 +11,7 @@ class Miniplayer extends StatefulWidget {
|
||||||
final MiniplayerBuilder builder;
|
final MiniplayerBuilder builder;
|
||||||
final Curve curve;
|
final Curve curve;
|
||||||
final Color backgroundColor;
|
final Color backgroundColor;
|
||||||
|
final Duration duration;
|
||||||
final ValueNotifier<double> valueNotifier;
|
final ValueNotifier<double> valueNotifier;
|
||||||
|
|
||||||
const Miniplayer({
|
const Miniplayer({
|
||||||
|
@ -22,6 +23,7 @@ class Miniplayer extends StatefulWidget {
|
||||||
this.elevation = 0,
|
this.elevation = 0,
|
||||||
this.backgroundColor = const Color(0x70000000),
|
this.backgroundColor = const Color(0x70000000),
|
||||||
this.valueNotifier,
|
this.valueNotifier,
|
||||||
|
this.duration = const Duration(milliseconds: 300),
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -52,9 +54,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
|
|
||||||
_animationController = AnimationController(
|
_animationController = AnimationController(
|
||||||
vsync: this,
|
vsync: this,
|
||||||
duration: Duration(
|
duration: widget.duration,
|
||||||
milliseconds: 300,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
_animationController.addStatusListener((status) {
|
_animationController.addStatusListener((status) {
|
||||||
|
|
Loading…
Reference in New Issue