fixed the int to double type conversion issue
This commit is contained in:
parent
5879fe3502
commit
0c528cc193
|
@ -167,7 +167,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
onTap: () => _animateToHeight(widget.minHeight),
|
onTap: () => _animateToHeight(widget.minHeight),
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: borderDouble(
|
opacity: borderDouble(
|
||||||
minRange: 0, maxRange: 1, value: _percentage),
|
minRange: 0.0, maxRange: 1.0, value: _percentage),
|
||||||
child: Container(color: widget.backgroundColor),
|
child: Container(color: widget.backgroundColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -184,7 +184,9 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
|
|
||||||
return Opacity(
|
return Opacity(
|
||||||
opacity: borderDouble(
|
opacity: borderDouble(
|
||||||
minRange: 0, maxRange: 1, value: 1 - value * 0.8),
|
minRange: 0.0,
|
||||||
|
maxRange: 1.0,
|
||||||
|
value: 1 - value * 0.8),
|
||||||
child: Transform.translate(
|
child: Transform.translate(
|
||||||
offset: Offset(0.0, widget.minHeight * value * 0.5),
|
offset: Offset(0.0, widget.minHeight * value * 0.5),
|
||||||
child: child,
|
child: child,
|
||||||
|
@ -297,8 +299,8 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
|
||||||
///Drag below minHeight
|
///Drag below minHeight
|
||||||
else if (onDismissed != null) {
|
else if (onDismissed != null) {
|
||||||
var percentageDown = borderDouble(
|
var percentageDown = borderDouble(
|
||||||
minRange: 0,
|
minRange: 0.0,
|
||||||
maxRange: 1,
|
maxRange: 1.0,
|
||||||
value: percentageFromValueInRange(
|
value: percentageFromValueInRange(
|
||||||
min: widget.minHeight, max: 0, value: _dragHeight));
|
min: widget.minHeight, max: 0, value: _dragHeight));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue