Skip to content

Commit

Permalink
feat(player): add volume slider floating label showing percentage (#1445
Browse files Browse the repository at this point in the history
)

* docs: broken link in README.md (fixes #1310) (#1311)

* docs: remove appimage link in readme #1082 (#1171)

* Updating Readme according to #1082

Updating Readme according to #1082

* Added explanation

The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue.

* add volume level tooltip in volume_slider

---------

Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com>
Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com>
Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com>
  • Loading branch information
4 people committed May 10, 2024
1 parent bf45681 commit 8fad225
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/collections/env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ abstract class Env {
kIsFlatpak || _enableUpdateChecker == "1";

static String discordAppId = "1176718791388975124";
}
}
17 changes: 11 additions & 6 deletions lib/components/player/volume_slider.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:spotube/collections/spotube_icons.dart';

Expand Down Expand Up @@ -31,11 +30,17 @@ class VolumeSlider extends HookConsumerWidget {
}
}
},
child: Slider(
min: 0,
max: 1,
value: value,
onChanged: onChanged,
child: SliderTheme(
data: const SliderThemeData(
showValueIndicator: ShowValueIndicator.always,
),
child: Slider(
min: 0,
max: 1,
label: (value * 100).toStringAsFixed(0),
value: value,
onChanged: onChanged,
),
),
);
return Row(
Expand Down

0 comments on commit 8fad225

Please sign in to comment.