mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
commit
33778c5a3a
6 files changed
+32
-4
No files matched your search
@@ -76,6 +76,10 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
appBar: AppBar(
|
||||
title: Text(widget.series.name),
|
||||
backgroundColor: Colors.black87,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.grey.shade900,
|
||||
body: _isLoading
|
||||
|
||||
@@ -292,7 +292,7 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
return MediaCard(
|
||||
title: movie.name,
|
||||
imageUrl: movie.streamIcon,
|
||||
imageUrl: movie.streamIcon,
|
||||
|
||||
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
||||
rating: _formatRating(movie.rating),
|
||||
isWatched: isWatched,
|
||||
|
||||
@@ -282,7 +282,7 @@ class _SeriesTabState extends ConsumerState<SeriesTab> {
|
||||
return MediaCard(
|
||||
title: serie.name,
|
||||
imageUrl: serie.cover,
|
||||
imageUrl: serie.cover,
|
||||
|
||||
subtitle: serie.rating != null ? '${_formatRating(serie.rating)} ★' : null,
|
||||
rating: _formatRating(serie.rating),
|
||||
placeholderIcon: Icons.tv,
|
||||
|
||||
@@ -24,6 +24,30 @@ class MobileSeriesDetailScreen extends ConsumerStatefulWidget {
|
||||
}
|
||||
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
return MediaCard(
|
||||
title: movie.name,
|
||||
imageUrl: movie.streamIcon,
|
||||
imageUrl: movie.streamIcon,
|
||||
|
||||
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
||||
rating: _formatRating(movie.rating),
|
||||
isWatched: isWatched,
|
||||
|
||||
@@ -252,7 +252,7 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
return MediaCard(
|
||||
title: series.name,
|
||||
imageUrl: series.cover,
|
||||
imageUrl: series.cover,
|
||||
|
||||
subtitle: series.rating != null ? '${_formatRating(series.rating)} ★' : null,
|
||||
rating: _formatRating(series.rating),
|
||||
placeholderIcon: Icons.tv,
|
||||
|
||||
Reference in new issue
Block a user