From e4cbdd37479a572198c1ca27fcbbba0232275513 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 11 Jul 2023 22:13:22 +0600 Subject: [PATCH] fix: remove adaptive widgets (#520) --- .../playlist_generate/recommendation_attribute_dials.dart | 6 +++--- lib/components/player/player_actions.dart | 2 +- lib/components/player/player_controls.dart | 2 +- lib/components/player/volume_slider.dart | 2 +- lib/components/shared/track_table/track_tile.dart | 2 +- lib/components/shared/track_table/tracks_table_view.dart | 2 +- lib/pages/library/playlist_generate/playlist_generate.dart | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/components/library/playlist_generate/recommendation_attribute_dials.dart b/lib/components/library/playlist_generate/recommendation_attribute_dials.dart index 5af0b870f..87f7cb1ba 100644 --- a/lib/components/library/playlist_generate/recommendation_attribute_dials.dart +++ b/lib/components/library/playlist_generate/recommendation_attribute_dials.dart @@ -40,7 +40,7 @@ class RecommendationAttributeDials extends HookWidget { children: [ Text(context.l10n.min, style: labelStyle), Expanded( - child: Slider.adaptive( + child: Slider( 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.adaptive( + child: Slider( 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.adaptive( + child: Slider( value: values.max / base, min: 0, max: 1, diff --git a/lib/components/player/player_actions.dart b/lib/components/player/player_actions.dart index 0d17c263c..78d90ff1b 100644 --- a/lib/components/player/player_actions.dart +++ b/lib/components/player/player_actions.dart @@ -128,7 +128,7 @@ class PlayerActions extends HookConsumerWidget { const SizedBox( height: 20, width: 20, - child: CircularProgressIndicator.adaptive( + child: CircularProgressIndicator( strokeWidth: 2, ), ) diff --git a/lib/components/player/player_controls.dart b/lib/components/player/player_controls.dart index 11f697403..b4984c513 100644 --- a/lib/components/player/player_controls.dart +++ b/lib/components/player/player_controls.dart @@ -141,7 +141,7 @@ class PlayerControls extends HookConsumerWidget { children: [ Tooltip( message: context.l10n.slide_to_seek, - child: Slider.adaptive( + child: Slider( // cannot divide by zero // there's an edge case for value being bigger // than total duration. Keeping it resolved diff --git a/lib/components/player/volume_slider.dart b/lib/components/player/volume_slider.dart index 55f8520dd..754451259 100644 --- a/lib/components/player/volume_slider.dart +++ b/lib/components/player/volume_slider.dart @@ -29,7 +29,7 @@ class VolumeSlider extends HookConsumerWidget { } } }, - child: Slider.adaptive( + child: Slider( min: 0, max: 1, value: volume, diff --git a/lib/components/shared/track_table/track_tile.dart b/lib/components/shared/track_table/track_tile.dart index 4953a6abe..7926f55aa 100644 --- a/lib/components/shared/track_table/track_tile.dart +++ b/lib/components/shared/track_table/track_tile.dart @@ -92,7 +92,7 @@ class TrackTile extends HookConsumerWidget { else if (constrains.smAndDown) const SizedBox(width: 16), if (onChanged != null) - Checkbox.adaptive( + Checkbox( value: selected, onChanged: onChanged, ), diff --git a/lib/components/shared/track_table/tracks_table_view.dart b/lib/components/shared/track_table/tracks_table_view.dart index d41d47381..6172f5011 100644 --- a/lib/components/shared/track_table/tracks_table_view.dart +++ b/lib/components/shared/track_table/tracks_table_view.dart @@ -115,7 +115,7 @@ class TracksTableView extends HookConsumerWidget { ); }, child: showCheck.value - ? Checkbox.adaptive( + ? Checkbox( value: selected.value.length == sortedTracks.length, onChanged: (checked) { if (!showCheck.value) showCheck.value = true; diff --git a/lib/pages/library/playlist_generate/playlist_generate.dart b/lib/pages/library/playlist_generate/playlist_generate.dart index c6f65fb69..786568739 100644 --- a/lib/pages/library/playlist_generate/playlist_generate.dart +++ b/lib/pages/library/playlist_generate/playlist_generate.dart @@ -285,7 +285,7 @@ class PlaylistGeneratorPage extends HookConsumerWidget { ), ), Expanded( - child: Slider.adaptive( + child: Slider( value: value.toDouble(), min: 10, max: 100,