Make some methods private
This commit is contained in:
parent
6abc2f3080
commit
289bad9ef0
|
@ -57,7 +57,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
StreamController<double>.broadcast();
|
StreamController<double>.broadcast();
|
||||||
AnimationController _animationController;
|
AnimationController _animationController;
|
||||||
|
|
||||||
void statusListener(AnimationStatus status) {
|
void _statusListener(AnimationStatus status) {
|
||||||
if (status == AnimationStatus.completed) {
|
if (status == AnimationStatus.completed) {
|
||||||
//unblock touch events
|
//unblock touch events
|
||||||
animating = false;
|
animating = false;
|
||||||
|
@ -154,7 +154,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () => snapToPosition(_dragHeight != widget.maxHeight
|
onTap: () => _snapToPosition(_dragHeight != widget.maxHeight
|
||||||
? SnapPosition.MAX
|
? SnapPosition.MAX
|
||||||
: SnapPosition.MIN),
|
: SnapPosition.MIN),
|
||||||
onPanStart: (details) {
|
onPanStart: (details) {
|
||||||
|
@ -208,7 +208,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Snap to position
|
///Snap to position
|
||||||
snapToPosition(snap);
|
_snapToPosition(snap);
|
||||||
},
|
},
|
||||||
onPanUpdate: (details) {
|
onPanUpdate: (details) {
|
||||||
if (animating) return;
|
if (animating) return;
|
||||||
|
@ -217,7 +217,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
_dragHeight -= details.delta.dy;
|
_dragHeight -= details.delta.dy;
|
||||||
updateCount++;
|
updateCount++;
|
||||||
|
|
||||||
handleHeightChange();
|
_handleHeightChange();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -230,7 +230,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Determines whether the panel should be updated in height or discarded
|
///Determines whether the panel should be updated in height or discarded
|
||||||
void handleHeightChange({bool animation = false}) {
|
void _handleHeightChange({bool animation = false}) {
|
||||||
///Drag above minHeight
|
///Drag above minHeight
|
||||||
if (_dragHeight >= widget.minHeight) {
|
if (_dragHeight >= widget.minHeight) {
|
||||||
if (dragDownPercentage.value != 0) dragDownPercentage.value = 0;
|
if (dragDownPercentage.value != 0) dragDownPercentage.value = 0;
|
||||||
|
@ -261,7 +261,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Animates the panel height according to a SnapPoint
|
///Animates the panel height according to a SnapPoint
|
||||||
void snapToPosition(SnapPosition snapPosition) {
|
void _snapToPosition(SnapPosition snapPosition) {
|
||||||
switch (snapPosition) {
|
switch (snapPosition) {
|
||||||
case SnapPosition.MAX:
|
case SnapPosition.MAX:
|
||||||
_animateToHeight(widget.maxHeight);
|
_animateToHeight(widget.maxHeight);
|
||||||
|
@ -290,7 +290,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
|
|
||||||
_dragHeight = _sizeAnimation.value;
|
_dragHeight = _sizeAnimation.value;
|
||||||
|
|
||||||
handleHeightChange(animation: true);
|
_handleHeightChange(animation: true);
|
||||||
});
|
});
|
||||||
|
|
||||||
animating = true;
|
animating = true;
|
||||||
|
|
Loading…
Reference in New Issue