feat: adaptive controllers

This commit is contained in:
Kingkor Roy Tirtho 2023-06-12 09:22:31 +06:00
parent 617aa89409
commit c8b7de0879
5 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ class RecommendationAttributeDials extends HookWidget {
children: [
Text(context.l10n.min, style: labelStyle),
Expanded(
child: Slider(
child: Slider.adaptive(
value: values.min / base,
min: 0,
max: 1,
@ -58,7 +58,7 @@ class RecommendationAttributeDials extends HookWidget {
children: [
Text(context.l10n.target, style: labelStyle),
Expanded(
child: Slider(
child: Slider.adaptive(
value: values.target / base,
min: 0,
max: 1,
@ -76,7 +76,7 @@ class RecommendationAttributeDials extends HookWidget {
children: [
Text(context.l10n.max, style: labelStyle),
Expanded(
child: Slider(
child: Slider.adaptive(
value: values.max / base,
min: 0,
max: 1,

View File

@ -141,7 +141,7 @@ class PlayerControls extends HookConsumerWidget {
children: [
Tooltip(
message: context.l10n.slide_to_seek,
child: Slider(
child: Slider.adaptive(
// cannot divide by zero
// there's an edge case for value being bigger
// than total duration. Keeping it resolved

View File

@ -157,7 +157,7 @@ class BottomPlayer extends HookConsumerWidget {
}
}
},
child: Slider(
child: Slider.adaptive(
min: 0,
max: 1,
value: volume,

View File

@ -75,7 +75,7 @@ class TracksTableView extends HookConsumerWidget {
if (heading != null) heading!,
Row(
children: [
Checkbox(
Checkbox.adaptive(
value: selected.value.length == sortedTracks.length,
onChanged: (checked) {
if (!showCheck.value) showCheck.value = true;

View File

@ -281,7 +281,7 @@ class PlaylistGeneratorPage extends HookConsumerWidget {
),
),
Expanded(
child: Slider(
child: Slider.adaptive(
value: value.toDouble(),
min: 10,
max: 100,