feat: add LiveTVTab for browsing live channels with search and favorites, and PlayerScreen for channel playback.

This commit is contained in:
Michael committed 2026-01-01 18:17:35 +01:00
1 parent a1a8810ddc
commit be51118dc2
2 files changed
+57 -31

No files matched your search

+49 -24
View File
@@ -373,33 +373,58 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
), ),
), ),
// Channel Zapping Controls // Bottom Controls for Live TV (Channel Zapping + Play/Pause)
if (widget.channels != null && widget.channels!.length > 1) if (_showControls)
AnimatedPositioned( AnimatedPositioned(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
bottom: 160, bottom: 40,
right: _showControls ? 24 : -100, left: 0,
right: 0,
child: PointerInterceptor( child: PointerInterceptor(
child: GlassContainer( child: Center(
width: 60, child: GlassContainer(
borderRadius: 30, borderRadius: 30,
opacity: 0.15, opacity: 0.15,
padding: const EdgeInsets.symmetric(vertical: 12), border: true,
child: Column( borderColor: Colors.white.withOpacity(0.1),
mainAxisSize: MainAxisSize.min, padding: const EdgeInsets.symmetric(
children: [ horizontal: 24, vertical: 12),
_buildGlassIconButton( child: Row(
icon: Icons.keyboard_arrow_up_rounded, mainAxisSize: MainAxisSize.min,
onTap: _previousChannel, children: [
transparent: true, // Previous Channel
), if (widget.channels != null &&
const SizedBox(height: 8), widget.channels!.length > 1) ...[
_buildGlassIconButton( _buildGlassIconButton(
icon: Icons.keyboard_arrow_down_rounded, icon: Icons.skip_previous_rounded,
onTap: _nextChannel, onTap: _previousChannel,
transparent: true, transparent: true,
), ),
], const SizedBox(width: 24),
],
// Play/Pause
_buildGlassIconButton(
icon: _isPlaying
? Icons.pause_rounded
: Icons.play_arrow_rounded,
onTap: _togglePlayPause,
size: 56,
iconSize: 32,
),
// Next Channel
if (widget.channels != null &&
widget.channels!.length > 1) ...[
const SizedBox(width: 24),
_buildGlassIconButton(
icon: Icons.skip_next_rounded,
onTap: _nextChannel,
transparent: true,
),
],
],
),
), ),
), ),
), ),
+8 -7
View File
@@ -383,28 +383,29 @@ class _LiveTVTabState extends ConsumerState<LiveTVTab>
// Icon Area // Icon Area
Expanded( Expanded(
child: Container( child: Container(
decoration: const BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white
.withOpacity(0.05), // Subtle transparent background
borderRadius: borderRadius:
BorderRadius.vertical(top: Radius.circular(12)), const BorderRadius.vertical(top: Radius.circular(12)),
), ),
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: Center( child: Center(
child: channel.streamIcon.isNotEmpty child: channel.streamIcon.isNotEmpty
? Image.network( ? Image.network(
_getProxiedIconUrl(channel.streamIcon)!, _getProxiedIconUrl(channel.streamIcon)!,
errorBuilder: (_, __, ___) => const Icon( errorBuilder: (_, __, ___) => Icon(
Icons.tv, Icons.tv,
color: Colors.grey, color: Colors.white.withOpacity(0.3),
size: 40, size: 40,
), ),
) )
: Text( : Text(
channel.name.characters.first.toUpperCase(), channel.name.characters.first.toUpperCase(),
style: GoogleFonts.inter( style: GoogleFonts.outfit(
fontSize: 40, fontSize: 40,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black12, color: Colors.white24,
), ),
), ),
), ),