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