mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: Add new UI components for IPTV movies and series, including mobile-specific tabs with search and pagination, and a series detail screen.
This commit is contained in:
1 parent
59bb26479e
commit
643bf7e761
5 files changed
+28
-4
No files matched your search
@@ -292,7 +292,7 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
|||||||
return MediaCard(
|
return MediaCard(
|
||||||
title: movie.name,
|
title: movie.name,
|
||||||
imageUrl: movie.streamIcon,
|
imageUrl: movie.streamIcon,
|
||||||
imageUrl: movie.streamIcon,
|
|
||||||
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
||||||
rating: _formatRating(movie.rating),
|
rating: _formatRating(movie.rating),
|
||||||
isWatched: isWatched,
|
isWatched: isWatched,
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ class _SeriesTabState extends ConsumerState<SeriesTab> {
|
|||||||
return MediaCard(
|
return MediaCard(
|
||||||
title: serie.name,
|
title: serie.name,
|
||||||
imageUrl: serie.cover,
|
imageUrl: serie.cover,
|
||||||
imageUrl: serie.cover,
|
|
||||||
subtitle: serie.rating != null ? '${_formatRating(serie.rating)} ★' : null,
|
subtitle: serie.rating != null ? '${_formatRating(serie.rating)} ★' : null,
|
||||||
rating: _formatRating(serie.rating),
|
rating: _formatRating(serie.rating),
|
||||||
placeholderIcon: Icons.tv,
|
placeholderIcon: Icons.tv,
|
||||||
|
|||||||
@@ -24,6 +24,30 @@ class MobileSeriesDetailScreen extends ConsumerStatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MobileSeriesDetailScreenState extends ConsumerState<MobileSeriesDetailScreen> {
|
class _MobileSeriesDetailScreenState extends ConsumerState<MobileSeriesDetailScreen> {
|
||||||
|
SeriesInfo? _seriesInfo;
|
||||||
|
bool _isLoading = true;
|
||||||
|
String? _error;
|
||||||
|
int _selectedSeason = 1;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_loadSeriesInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
String? _formatRating(String? rating) {
|
||||||
|
if (rating == null || rating.isEmpty) return null;
|
||||||
|
final value = double.tryParse(rating);
|
||||||
|
if (value != null) {
|
||||||
|
return value.toStringAsFixed(1);
|
||||||
|
}
|
||||||
|
return rating;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _loadSeriesInfo() async {
|
||||||
|
try {
|
||||||
|
setState(() {
|
||||||
|
_isLoading = true;
|
||||||
_error = null;
|
_error = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
|||||||
return MediaCard(
|
return MediaCard(
|
||||||
title: movie.name,
|
title: movie.name,
|
||||||
imageUrl: movie.streamIcon,
|
imageUrl: movie.streamIcon,
|
||||||
imageUrl: movie.streamIcon,
|
|
||||||
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
||||||
rating: _formatRating(movie.rating),
|
rating: _formatRating(movie.rating),
|
||||||
isWatched: isWatched,
|
isWatched: isWatched,
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
|||||||
return MediaCard(
|
return MediaCard(
|
||||||
title: series.name,
|
title: series.name,
|
||||||
imageUrl: series.cover,
|
imageUrl: series.cover,
|
||||||
imageUrl: series.cover,
|
|
||||||
subtitle: series.rating != null ? '${_formatRating(series.rating)} ★' : null,
|
subtitle: series.rating != null ? '${_formatRating(series.rating)} ★' : null,
|
||||||
rating: _formatRating(series.rating),
|
rating: _formatRating(series.rating),
|
||||||
placeholderIcon: Icons.tv,
|
placeholderIcon: Icons.tv,
|
||||||
|
|||||||
Reference in new issue
Block a user