Merge pull request #18 from toklive/master

fix #15 int to double type conversion issue
This commit is contained in:
David Peters 2021-09-29 11:04:34 +02:00 committed by GitHub
commit 3a7107adfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -167,7 +167,7 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
onTap: () => _animateToHeight(widget.minHeight),
child: Opacity(
opacity: borderDouble(
minRange: 0, maxRange: 1, value: _percentage),
minRange: 0.0, maxRange: 1.0, value: _percentage),
child: Container(color: widget.backgroundColor),
),
),
@ -184,7 +184,9 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
return Opacity(
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(
offset: Offset(0.0, widget.minHeight * value * 0.5),
child: child,
@ -297,8 +299,8 @@ class _MiniplayerState extends State<Miniplayer> with TickerProviderStateMixin {
///Drag below minHeight
else if (onDismissed != null) {
var percentageDown = borderDouble(
minRange: 0,
maxRange: 1,
minRange: 0.0,
maxRange: 1.0,
value: percentageFromValueInRange(
min: widget.minHeight, max: 0, value: _dragHeight));