From 6ee7fa178a8accf3dd3194324941c9d43a7fbe80 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Sat, 6 Dec 2025 20:45:04 +0100 Subject: [PATCH] feat: Add movies tab with pagination, search, and player integration. --- lib/core/theme/app_theme.dart | 26 +++++++++---------- .../widgets/components/ui_components.dart | 1 + .../iptv/services/xtream_service.dart | 2 +- lib/features/iptv/widgets/movies_tab.dart | 4 +-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/lib/core/theme/app_theme.dart b/lib/core/theme/app_theme.dart index 860498f..2de9198 100644 --- a/lib/core/theme/app_theme.dart +++ b/lib/core/theme/app_theme.dart @@ -103,21 +103,21 @@ class AppTheme { ), // Cards: Transparent by default (content defines look) - cardTheme: const CardTheme( - color: AppColors.surface, - elevation: 0, - margin: EdgeInsets.zero, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(radiusMd))), - ), + // cardTheme: const CardTheme( + // color: AppColors.surface, + // elevation: 0, + // margin: EdgeInsets.zero, + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(radiusMd))), + // ), // Dialogs: Glass/Dark - dialogTheme: DialogTheme( - backgroundColor: const Color(0xFF1C1C1E), // Apple Dark Grey - elevation: 24, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radiusLg)), - titleTextStyle: GoogleFonts.inter(fontSize: 20, fontWeight: FontWeight.bold, color: AppColors.textPrimary), - contentTextStyle: GoogleFonts.inter(fontSize: 16, color: AppColors.textSecondary), - ), + // dialogTheme: DialogTheme( + // backgroundColor: const Color(0xFF1C1C1E), // Apple Dark Grey + // elevation: 24, + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radiusLg)), + // titleTextStyle: GoogleFonts.inter(fontSize: 20, fontWeight: FontWeight.bold, color: AppColors.textPrimary), + // contentTextStyle: GoogleFonts.inter(fontSize: 16, color: AppColors.textSecondary), + // ), ); } diff --git a/lib/core/widgets/components/ui_components.dart b/lib/core/widgets/components/ui_components.dart index b69401a..d708b7c 100644 --- a/lib/core/widgets/components/ui_components.dart +++ b/lib/core/widgets/components/ui_components.dart @@ -1,5 +1,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:cached_network_image/cached_network_image.dart'; import '../../theme/app_colors.dart'; import '../../theme/app_theme.dart'; diff --git a/lib/features/iptv/services/xtream_service.dart b/lib/features/iptv/services/xtream_service.dart index d607c91..0bdcdab 100644 --- a/lib/features/iptv/services/xtream_service.dart +++ b/lib/features/iptv/services/xtream_service.dart @@ -326,7 +326,7 @@ class XtreamService { } /// Get movies with pagination support - Future> getMovies({int offset = 0, int limit = 100}) async { + Future> getMoviesPaginated({int offset = 0, int limit = 100}) async { if (_currentPlaylist == null) throw Exception('No playlist configured'); try { diff --git a/lib/features/iptv/widgets/movies_tab.dart b/lib/features/iptv/widgets/movies_tab.dart index 4d11e1d..fa7650d 100644 --- a/lib/features/iptv/widgets/movies_tab.dart +++ b/lib/features/iptv/widgets/movies_tab.dart @@ -8,7 +8,7 @@ import '../../../core/theme/app_theme.dart'; import '../../../core/utils/responsive_layout.dart'; import '../../../core/widgets/components/hero_carousel.dart'; import '../../../core/widgets/components/ui_components.dart'; -import '../../favorites/providers/watch_history_provider.dart'; +import '../providers/watch_history_provider.dart'; import '../models/xtream_models.dart'; import '../providers/xtream_provider.dart'; import '../providers/settings_provider.dart'; @@ -158,7 +158,7 @@ class _MoviesTabState extends ConsumerState { } else { displayMovies = settings.moviesKeywords.isEmpty ? _movies - : _movies.where((m) => settings.matchesMovieFilter(m.categoryName)).toList(); + : _movies.where((m) => settings.matchesMoviesFilter(m.categoryName)).toList(); } // Hero Items (Take 5 random or first 5)