feat: implement IPTV dashboard screen with Apple TV-style floating top bar navigation.

This commit is contained in:
Michael committed 2025-12-07 00:23:57 +01:00
1 parent 12f5ddcf97
commit d6977454eb
4 files changed
+50 -37

No files matched your search

+41 -31
View File
@@ -63,40 +63,23 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> with SingleTi
], ],
), ),
), ),
child: Stack( child: Row(
alignment: Alignment.center,
children: [ children: [
// 1. Side Elements (Logo & Profile) - Pushed to edges // 1. Logo Area (Fixed Width for centering balance)
Row( SizedBox(
mainAxisAlignment: MainAxisAlignment.spaceBetween, width: 200,
children: [ child: Align(
// Logo Area alignment: Alignment.centerLeft,
_buildLogo(), child: _buildLogo(),
// Search / Profile (Right Side)
Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: const Icon(Icons.search, color: Colors.white),
onPressed: () {
// Global search trigger
},
), ),
const SizedBox(width: 8),
const CircleAvatar(
radius: 16,
backgroundColor: Colors.white24,
child: Icon(Icons.person, size: 18, color: Colors.white),
),
],
),
],
), ),
// 2. Centered Navigation Tabs (Pills) // 2. Centered Navigation Tabs (Expanded to fill space, then Centered)
Container( Expanded(
child: Center(
child: Container(
height: 50, height: 50,
constraints: const BoxConstraints(maxWidth: 600), // Prevent taking too much space
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1), color: Colors.white.withOpacity(0.1),
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
@@ -112,8 +95,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> with SingleTi
), ),
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorPadding: const EdgeInsets.all(4), indicatorPadding: const EdgeInsets.all(4),
labelColor: Colors.black, // Active text color (on white) labelColor: Colors.black,
unselectedLabelColor: Colors.grey, unselectedLabelColor: Colors.white70, // Fixed: Improved readability
labelStyle: GoogleFonts.inter(fontWeight: FontWeight.w700, fontSize: 13), labelStyle: GoogleFonts.inter(fontWeight: FontWeight.w700, fontSize: 13),
overlayColor: WidgetStateProperty.all(Colors.transparent), overlayColor: WidgetStateProperty.all(Colors.transparent),
tabs: List.generate(_tabs.length, (index) { tabs: List.generate(_tabs.length, (index) {
@@ -132,6 +115,33 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> with SingleTi
}), }),
), ),
), ),
),
),
// 3. Search / Profile (Fixed Width for centering balance)
SizedBox(
width: 200,
child: Align(
alignment: Alignment.centerRight,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: const Icon(Icons.search, color: Colors.white),
onPressed: () {
// Global search trigger
},
),
const SizedBox(width: 8),
const CircleAvatar(
radius: 16,
backgroundColor: Colors.white24,
child: Icon(Icons.person, size: 18, color: Colors.white),
),
],
),
),
),
], ],
), ),
), ),
+3 -2
View File
@@ -148,9 +148,10 @@ class _LiveTVTabState extends ConsumerState<LiveTVTab>
Expanded( Expanded(
child: TextField( child: TextField(
controller: _searchController, controller: _searchController,
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary), style: const TextStyle(fontSize: 14, color: Colors.white),
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Search channels', hintText: 'Rechercher...',
hintStyle: TextStyle(color: Colors.white54),
border: InputBorder.none, border: InputBorder.none,
isDense: true, isDense: true,
contentPadding: EdgeInsets.only(bottom: 11), contentPadding: EdgeInsets.only(bottom: 11),
+3 -2
View File
@@ -214,9 +214,10 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
Expanded( Expanded(
child: TextField( child: TextField(
controller: _searchController, controller: _searchController,
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary), style: const TextStyle(fontSize: 14, color: Colors.white),
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Search', hintText: 'Rechercher...',
hintStyle: TextStyle(color: Colors.white54),
border: InputBorder.none, border: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
+3 -2
View File
@@ -205,9 +205,10 @@ class _SeriesTabState extends ConsumerState<SeriesTab> {
Expanded( Expanded(
child: TextField( child: TextField(
controller: _searchController, controller: _searchController,
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary), style: const TextStyle(fontSize: 14, color: Colors.white),
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Search', hintText: 'Rechercher...',
hintStyle: TextStyle(color: Colors.white54),
border: InputBorder.none, border: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,