mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
Merge pull request #62 from R0m1k3/antigravity
feat: implement IPTV dashboard screen with Apple TV-style floating to…
This commit is contained in:
4 files changed
+69
-56
No files matched your search
@@ -63,18 +63,67 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> with SingleTi
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
children: [
|
||||
// 1. Side Elements (Logo & Profile) - Pushed to edges
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Logo Area
|
||||
_buildLogo(),
|
||||
|
||||
// Search / Profile (Right Side)
|
||||
Row(
|
||||
// 1. Logo Area (Fixed Width for centering balance)
|
||||
SizedBox(
|
||||
width: 200,
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: _buildLogo(),
|
||||
),
|
||||
),
|
||||
|
||||
// 2. Centered Navigation Tabs (Expanded to fill space, then Centered)
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Container(
|
||||
height: 50,
|
||||
constraints: const BoxConstraints(maxWidth: 600), // Prevent taking too much space
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Colors.white.withOpacity(0.05)),
|
||||
),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
isScrollable: true,
|
||||
dividerColor: Colors.transparent,
|
||||
indicator: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
indicatorPadding: const EdgeInsets.all(4),
|
||||
labelColor: Colors.black,
|
||||
unselectedLabelColor: Colors.white70, // Fixed: Improved readability
|
||||
labelStyle: GoogleFonts.inter(fontWeight: FontWeight.w700, fontSize: 13),
|
||||
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
||||
tabs: List.generate(_tabs.length, (index) {
|
||||
return Tab(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(_icons[index], size: 18),
|
||||
const SizedBox(width: 8),
|
||||
Text(_tabs[index]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// 3. Search / Profile (Fixed Width for centering balance)
|
||||
SizedBox(
|
||||
width: 200,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
@@ -91,45 +140,6 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> with SingleTi
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// 2. Centered Navigation Tabs (Pills)
|
||||
Container(
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Colors.white.withOpacity(0.05)),
|
||||
),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
isScrollable: true,
|
||||
dividerColor: Colors.transparent,
|
||||
indicator: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
indicatorPadding: const EdgeInsets.all(4),
|
||||
labelColor: Colors.black, // Active text color (on white)
|
||||
unselectedLabelColor: Colors.grey,
|
||||
labelStyle: GoogleFonts.inter(fontWeight: FontWeight.w700, fontSize: 13),
|
||||
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
||||
tabs: List.generate(_tabs.length, (index) {
|
||||
return Tab(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(_icons[index], size: 18),
|
||||
const SizedBox(width: 8),
|
||||
Text(_tabs[index]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -148,9 +148,10 @@ class _LiveTVTabState extends ConsumerState<LiveTVTab>
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary),
|
||||
style: const TextStyle(fontSize: 14, color: Colors.white),
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Search channels',
|
||||
hintText: 'Rechercher...',
|
||||
hintStyle: TextStyle(color: Colors.white54),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.only(bottom: 11),
|
||||
|
||||
@@ -214,9 +214,10 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary),
|
||||
style: const TextStyle(fontSize: 14, color: Colors.white),
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Search',
|
||||
hintText: 'Rechercher...',
|
||||
hintStyle: TextStyle(color: Colors.white54),
|
||||
border: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
||||
@@ -205,9 +205,10 @@ class _SeriesTabState extends ConsumerState<SeriesTab> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: const TextStyle(fontSize: 14, color: AppColors.textPrimary),
|
||||
style: const TextStyle(fontSize: 14, color: Colors.white),
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Search',
|
||||
hintText: 'Rechercher...',
|
||||
hintStyle: TextStyle(color: Colors.white54),
|
||||
border: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
|
||||
Reference in new issue
Block a user