Skip to content

Commit

Permalink
Add duration property
Browse files Browse the repository at this point in the history
  • Loading branch information
dxvid-pts committed Aug 26, 2020
1 parent 897d115 commit 0fca3c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/miniplayer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Miniplayer extends StatefulWidget {
final MiniplayerBuilder builder;
final Curve curve;
final Color backgroundColor;
final Duration duration;
final ValueNotifier<double> valueNotifier;

const Miniplayer({
Expand All @@ -22,6 +23,7 @@ class Miniplayer extends StatefulWidget {
this.elevation = 0,
this.backgroundColor = const Color(0x70000000),
this.valueNotifier,
this.duration = const Duration(milliseconds: 300),
}) : super(key: key);

@override
Expand Down Expand Up @@ -52,9 +54,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {

_animationController = AnimationController(
vsync: this,
duration: Duration(
milliseconds: 300,
),
duration: widget.duration,
);

_animationController.addStatusListener((status) {
Expand Down

0 comments on commit 0fca3c3

Please sign in to comment.