diff options
author | Lisandro Pérez Meyer <lpmeyer@ics.com> | 2023-11-16 22:44:34 -0300 |
---|---|---|
committer | Lisandro Perez Meyer <lpmeyer@ics.com> | 2023-11-17 01:48:26 +0000 |
commit | 4d77bab5a0f698943d1abf74482eecef7cc95f08 (patch) | |
tree | 49e0a590b5903cc7553b1a4fc3cb2fbcd13cebf4 /lib/presentation/screens/media_player | |
parent | 6a00ac1f8613048b5c1f7ecdbd1adcbbcfdca5ed (diff) |
Bug fixes. Fixed Fan mode selection off state bug.
Fixes ICS' internal AGL-48,49,50.
Original from Sabin Sajeevan <ssajeevan@ics.com>
Bug-AGL: SPEC-4971
Change-Id: I66c875551a69a1b53eee2d6e1d3fa725b20ff41b
Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Diffstat (limited to 'lib/presentation/screens/media_player')
5 files changed, 113 insertions, 73 deletions
diff --git a/lib/presentation/screens/media_player/media_content.dart b/lib/presentation/screens/media_player/media_content.dart index 9a0ce19..0625c9c 100644 --- a/lib/presentation/screens/media_player/media_content.dart +++ b/lib/presentation/screens/media_player/media_content.dart @@ -22,10 +22,6 @@ class _MediaPlayerState extends State<MediaPlayer> { PlayListModel(songName: "Hey Ya!", albumName: "Outkast"), PlayListModel(songName: "One, Two, Step", albumName: "Ciara, Missy Elliot"), PlayListModel(songName: "Don’t Trust Me", albumName: "3OH!3"), - PlayListModel(songName: "Feel Good Inc.", albumName: "Gorillaz"), - PlayListModel(songName: "Feel Good Inc.", albumName: "Gorillaz"), - PlayListModel(songName: "Feel Good Inc.", albumName: "Gorillaz"), - PlayListModel(songName: "Feel Good Inc.", albumName: "Gorillaz"), ]; String selectedPlayListSongName = "Feel Good Inc."; @@ -33,29 +29,29 @@ class _MediaPlayerState extends State<MediaPlayer> { Widget build(BuildContext context) { double albumArtSize = 460; return Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - // const PlayerNavigation(), - SegmentedButtons( - navItems: navItems, - selectedNav: selectedNav, - ), - const SizedBox( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + // const PlayerNavigation(), + SegmentedButtons( + navItems: navItems, + selectedNav: selectedNav, + ), + const SizedBox( height: 32, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - "assets/AlbumArtMedia.png", - width: albumArtSize, - height: albumArtSize, - ) - ], - ), - const SizedBox( + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/AlbumArtMedia.png", + width: albumArtSize, + height: albumArtSize, + ) + ], + ), + const SizedBox( height: 40, - ), + ), Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -75,7 +71,7 @@ class _MediaPlayerState extends State<MediaPlayer> { type: "media", ), ], - ) + ) ], ); } diff --git a/lib/presentation/screens/media_player/media_player.dart b/lib/presentation/screens/media_player/media_player.dart index 9ec31e2..3126ac1 100644 --- a/lib/presentation/screens/media_player/media_player.dart +++ b/lib/presentation/screens/media_player/media_player.dart @@ -79,7 +79,7 @@ class _MediaPlayerBackgroundState extends State<MediaPlayerBackground> { }, ), Padding( - padding: const EdgeInsets.symmetric(horizontal: 144), + padding: const EdgeInsets.symmetric(horizontal: 80), child: SingleChildScrollView( child: selectedNav == "My Media" ? const MediaPlayer() @@ -88,10 +88,11 @@ class _MediaPlayerBackgroundState extends State<MediaPlayerBackground> { : Container(), ), ), - const Padding( - padding: EdgeInsets.symmetric(horizontal: 144, vertical: 23.5), - child: CustomVolumeSlider(), - ), + if (selectedNav == "My Media" || selectedNav == "FM") + const Padding( + padding: EdgeInsets.symmetric(horizontal: 144, vertical: 23.5), + child: CustomVolumeSlider(), + ), ], ), ); diff --git a/lib/presentation/screens/media_player/play_list_table.dart b/lib/presentation/screens/media_player/play_list_table.dart index b17cfca..e5c1292 100644 --- a/lib/presentation/screens/media_player/play_list_table.dart +++ b/lib/presentation/screens/media_player/play_list_table.dart @@ -1,3 +1,4 @@ +import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter_ics_homescreen/core/utils/helpers.dart'; import 'package:flutter_ics_homescreen/export.dart'; @@ -117,8 +118,9 @@ class _PlayListTableState extends State<PlayListTable> { children: [ Expanded( flex: 6, - child: Text( + child: AutoSizeText( index.songName, + maxLines: 1, style: TextStyle( color: Colors.white, fontSize: 40, diff --git a/lib/presentation/screens/media_player/segmented_buttons.dart b/lib/presentation/screens/media_player/segmented_buttons.dart index e649be3..5cc1d87 100644 --- a/lib/presentation/screens/media_player/segmented_buttons.dart +++ b/lib/presentation/screens/media_player/segmented_buttons.dart @@ -43,8 +43,6 @@ class _SegmentedButtonsState extends State<SegmentedButtons> { child: Row( children: navItems .map((e) => Container( - padding: const EdgeInsets.symmetric( - vertical: 24, horizontal: 32), decoration: BoxDecoration( borderRadius: selectedNav == e ? BorderRadius.circular(40) @@ -53,23 +51,30 @@ class _SegmentedButtonsState extends State<SegmentedButtons> { ? AGLDemoColors.backgroundInsetColor : null, ), - child: InkWell( - borderRadius: BorderRadius.circular(40), - onTap: () { - setState(() { - selectedNav = e; - }); - }, - child: Text( - e, - style: TextStyle( - color: selectedNav == e - ? Colors.white - : AGLDemoColors.periwinkleColor, - fontSize: 26, - fontWeight: selectedNav == e - ? FontWeight.w700 - : FontWeight.w500), + child: Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(40), + onTap: () { + setState(() { + selectedNav = e; + }); + }, + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 24, horizontal: 32), + child: Text( + e, + style: TextStyle( + color: selectedNav == e + ? Colors.white + : AGLDemoColors.periwinkleColor, + fontSize: 26, + fontWeight: selectedNav == e + ? FontWeight.w700 + : FontWeight.w500), + ), + ), ), ), )) diff --git a/lib/presentation/screens/media_player/widgets/media_volume_bar.dart b/lib/presentation/screens/media_player/widgets/media_volume_bar.dart index f8d58e6..2b063b4 100644 --- a/lib/presentation/screens/media_player/widgets/media_volume_bar.dart +++ b/lib/presentation/screens/media_player/widgets/media_volume_bar.dart @@ -53,21 +53,39 @@ class CustomVolumeSliderState extends ConsumerState<CustomVolumeSlider> { child: Row( children: [ Padding( - padding: const EdgeInsets.only(left: 10.0), - child: SizedBox( - width: 50, - child: IconButton( - padding: EdgeInsets.zero, - onPressed: () { + padding: const EdgeInsets.only(left: 20), + child: Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: () { _dercrease(); }, - icon: const Icon( - CustomIcons.vol_min, - color: AGLDemoColors.periwinkleColor, - size: 48, - )), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon( + CustomIcons.vol_min, + color: AGLDemoColors.periwinkleColor, + size: 60, + ))), ), ), + // Padding( + // padding: const EdgeInsets.only(left: 10.0), + // child: SizedBox( + // width: 50, + // child: IconButton( + // padding: EdgeInsets.zero, + // onPressed: () { + // _dercrease(); + // }, + // icon: const Icon( + // CustomIcons.vol_min, + // color: AGLDemoColors.periwinkleColor, + // size: 48, + // )), + // ), + // ), Expanded( child: SliderTheme( data: SliderThemeData( @@ -93,21 +111,39 @@ class CustomVolumeSliderState extends ConsumerState<CustomVolumeSlider> { ), ), Padding( - padding: const EdgeInsets.only(right: 10.0), - child: SizedBox( - width: 60, - child: IconButton( - padding: EdgeInsets.zero, - onPressed: () { + padding: const EdgeInsets.only(right: 20), + child: Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: () { _increase(); }, - icon: const Icon( - CustomIcons.vol_max, - color: AGLDemoColors.periwinkleColor, - size: 48, - )), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon( + CustomIcons.vol_max, + color: AGLDemoColors.periwinkleColor, + size: 60, + ))), ), ), + // Padding( + // padding: const EdgeInsets.only(right: 10.0), + // child: SizedBox( + // width: 60, + // child: IconButton( + // padding: EdgeInsets.zero, + // onPressed: () { + // _increase(); + // }, + // icon: const Icon( + // CustomIcons.vol_max, + // color: AGLDemoColors.periwinkleColor, + // size: 48, + // )), + // ), + // ), ], ), ), |