summaryrefslogtreecommitdiffstats
path: root/lib/presentation/screens/media_player/player_navigation.dart
diff options
context:
space:
mode:
authorLisandro Pérez Meyer <lpmeyer@ics.com>2023-11-14 17:20:58 -0300
committerLisandro Pérez Meyer <lpmeyer@ics.com>2023-11-14 17:31:12 -0300
commit70ec8a79a121471a004e7e4c23157d10157e136f (patch)
treea4f9c0a4fac4e4274ec4324a289b6ef62e1c5653 /lib/presentation/screens/media_player/player_navigation.dart
Initial cleanup push.
Based on agldemo2024 on commit 2a5dc04d801134338150c3f6afc67eaa65599763 Disable device preview. Disable Lottie animation. The original commit was b3c493c340fcb4bb0a937692838fc830bec3e9ea but I am just keeping this change, because the json did not really needed to change. I think. Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Diffstat (limited to 'lib/presentation/screens/media_player/player_navigation.dart')
-rw-r--r--lib/presentation/screens/media_player/player_navigation.dart80
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/presentation/screens/media_player/player_navigation.dart b/lib/presentation/screens/media_player/player_navigation.dart
new file mode 100644
index 0000000..8e09e53
--- /dev/null
+++ b/lib/presentation/screens/media_player/player_navigation.dart
@@ -0,0 +1,80 @@
+import 'package:flutter_ics_homescreen/core/utils/helpers.dart';
+import 'package:flutter_ics_homescreen/export.dart';
+
+class PlayerNavigation extends StatefulWidget {
+ const PlayerNavigation({super.key, required this.onPressed});
+ final Function onPressed;
+
+ @override
+ State<PlayerNavigation> createState() => _PlayerNavigationState();
+}
+
+class _PlayerNavigationState extends State<PlayerNavigation> {
+ List<String> navItems = ["My Media", "FM", "AM", "XM"];
+ String selectedNav = "My Media";
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ children: navItems
+ .map((e) => Expanded(
+ child: Container(
+ margin: const EdgeInsets.symmetric(horizontal: 2),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(colors: [
+ selectedNav == e
+ ? AGLDemoColors.neonBlueColor
+ : AGLDemoColors.buttonFillEnabledColor,
+ AGLDemoColors.gradientBackgroundDarkColor
+ ], begin: Alignment.topCenter, end: Alignment.bottomCenter),
+ // color: selectedNav == e
+ // ? AGLDemoColors.neonBlueColor
+ // : AGLDemoColors.buttonFillEnabledColor,
+ ),
+ child: Material(
+ color: Colors.transparent,
+ child: InkWell(
+ onTap: () {
+ setState(() {
+ selectedNav = e;
+ });
+ widget.onPressed(selectedNav);
+ },
+ child: Container(
+ padding: const EdgeInsets.symmetric(vertical: 7),
+ decoration: BoxDecoration(
+ border: Border(
+ left: selectedNav == e
+ ? const BorderSide(color: Colors.white12)
+ : BorderSide.none,
+ right: selectedNav == e
+ ? const BorderSide(color: Colors.white12)
+ : BorderSide.none,
+ top: BorderSide(
+ color: selectedNav == e
+ ? Colors.white
+ : Colors.white24,
+ width: selectedNav == e ? 2 : 1))),
+ child: Text(
+ e,
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 26,
+ shadows: [
+ selectedNav == e
+ ? Helpers.dropShadowRegular
+ : Helpers.dropShadowBig
+ ],
+ color: selectedNav == e
+ ? Colors.white
+ : AGLDemoColors.periwinkleColor,
+ fontWeight: selectedNav == e
+ ? FontWeight.w700
+ : FontWeight.w500),
+ ),
+ ),
+ ),
+ ),
+ )))
+ .toList());
+ }
+}