mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: remove video_player_win dependency
This commit is contained in:
1 parent
8c3a143f46
commit
37f6ab08db
9 files changed
+101
-58
No files matched your search
Binary file not shown.
@@ -7,8 +7,6 @@ import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
import '../providers/xtream_provider.dart';
|
||||
import '../providers/playback_positions_provider.dart';
|
||||
import '../providers/settings_provider.dart';
|
||||
import '../widgets/lite_player_view.dart';
|
||||
|
||||
// ... (existing imports)
|
||||
// ... (existing imports)
|
||||
@@ -17,7 +15,6 @@ import '../../../core/models/iptv_models.dart';
|
||||
import '../../../core/widgets/tv_focusable_card.dart';
|
||||
import '../../../core/widgets/glass_container.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../models/xtream_models.dart';
|
||||
import '../widgets/epg_overlay.dart';
|
||||
|
||||
enum StreamType { live, vod, series }
|
||||
|
||||
@@ -8,13 +8,10 @@ import '../screens/player_screen.dart';
|
||||
import '../../../core/models/iptv_models.dart';
|
||||
import '../../../core/models/playlist_config.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../core/utils/responsive_layout.dart';
|
||||
import '../../../core/widgets/components/ui_components.dart';
|
||||
import '../../../core/widgets/themed_loading_screen.dart';
|
||||
import '../../../core/widgets/glass_container.dart';
|
||||
import '../../../core/widgets/tv_focusable_card.dart';
|
||||
import 'channel_card.dart';
|
||||
|
||||
class LiveTVTab extends ConsumerStatefulWidget {
|
||||
final PlaylistConfig playlist;
|
||||
|
||||
@@ -4,10 +4,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import '../../../core/models/playlist_config.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../core/utils/responsive_layout.dart';
|
||||
import '../../../core/widgets/components/hero_carousel.dart';
|
||||
import '../../../core/widgets/themed_loading_screen.dart';
|
||||
import '../../../core/widgets/glass_container.dart';
|
||||
import '../../../core/widgets/tv_focusable_card.dart';
|
||||
import '../providers/watch_history_provider.dart';
|
||||
|
||||
@@ -399,7 +399,9 @@ class _SeriesTabState extends ConsumerState<SeriesTab> {
|
||||
fontWeight: FontWeight.w600,
|
||||
shadows: [
|
||||
const Shadow(
|
||||
color: Colors.black, blurRadius: 4),
|
||||
color: Colors.black,
|
||||
blurRadius: 4,
|
||||
),
|
||||
],
|
||||
),
|
||||
maxLines: 2,
|
||||
|
||||
@@ -198,7 +198,9 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14, color: Colors.white),
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search Series...',
|
||||
hintStyle: GoogleFonts.inter(color: Colors.white54),
|
||||
@@ -211,18 +213,24 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
),
|
||||
if (_isSearching)
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
height: 12,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2, color: Colors.white)),
|
||||
width: 12,
|
||||
height: 12,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
if (_searchQuery.isNotEmpty)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_searchController.clear();
|
||||
_onSearchChanged('');
|
||||
},
|
||||
child: const Icon(Icons.close,
|
||||
size: 16, color: Colors.white),
|
||||
child: const Icon(
|
||||
Icons.close,
|
||||
size: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -242,7 +250,8 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
onTap: (item) {
|
||||
try {
|
||||
final series = _series.firstWhere(
|
||||
(s) => s.seriesId.toString() == item.id);
|
||||
(s) => s.seriesId.toString() == item.id,
|
||||
);
|
||||
_openSeries(series);
|
||||
} catch (e) {
|
||||
// Fallback
|
||||
@@ -286,8 +295,11 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
)
|
||||
: Container(
|
||||
color: Colors.white10,
|
||||
child: const Icon(Icons.tv,
|
||||
color: Colors.white24)),
|
||||
child: const Icon(
|
||||
Icons.tv,
|
||||
color: Colors.white24,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Gradient Overlay
|
||||
@@ -303,11 +315,12 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black.withOpacity(0.9)
|
||||
Colors.black.withOpacity(0.9),
|
||||
],
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
bottom: Radius.circular(16)),
|
||||
bottom: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -320,9 +333,10 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
child: Text(
|
||||
series.name,
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600),
|
||||
color: Colors.white,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -337,19 +351,25 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
borderRadius: 4,
|
||||
opacity: 0.6,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 6, vertical: 2),
|
||||
horizontal: 6,
|
||||
vertical: 2,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.star,
|
||||
size: 10, color: Colors.amber),
|
||||
const Icon(
|
||||
Icons.star,
|
||||
size: 10,
|
||||
color: Colors.amber,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_formatRating(series.rating)!,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white),
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -369,7 +389,8 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(24),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(color: Colors.white)),
|
||||
child: CircularProgressIndicator(color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -91,7 +91,9 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
child: Text(
|
||||
currentUser?.username.substring(0, 1).toUpperCase() ?? 'U',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold, color: AppColors.primary),
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
@@ -111,16 +113,21 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 4),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 2),
|
||||
horizontal: 8,
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primary.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: const Text('ADMIN',
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: AppColors.primary,
|
||||
fontWeight: FontWeight.bold)),
|
||||
child: const Text(
|
||||
'ADMIN',
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: AppColors.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -140,18 +147,24 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
child: Column(
|
||||
children: [
|
||||
SwitchListTile(
|
||||
title: const Text('Dark Mode',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
secondary: Icon(isDark ? Icons.dark_mode : Icons.light_mode,
|
||||
color: AppColors.primary),
|
||||
title: const Text(
|
||||
'Dark Mode',
|
||||
style: TextStyle(color: AppColors.textPrimary),
|
||||
),
|
||||
secondary: Icon(
|
||||
isDark ? Icons.dark_mode : Icons.light_mode,
|
||||
color: AppColors.primary,
|
||||
),
|
||||
value: isDark,
|
||||
onChanged: (_) => themeNotifier.toggleTheme(),
|
||||
activeThumbColor: AppColors.primary,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
SwitchListTile(
|
||||
title: const Text('Show Clock',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
title: const Text(
|
||||
'Show Clock',
|
||||
style: TextStyle(color: AppColors.textPrimary),
|
||||
),
|
||||
secondary:
|
||||
const Icon(Icons.access_time, color: AppColors.primary),
|
||||
value: settings.showClock,
|
||||
@@ -181,10 +194,11 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
items: StreamQuality.values,
|
||||
labelBuilder: (v) => v.name.toUpperCase(),
|
||||
onChanged: (v) {
|
||||
if (v != null)
|
||||
if (v != null) {
|
||||
ref
|
||||
.read(iptvSettingsProvider.notifier)
|
||||
.setStreamQuality(v);
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
@@ -195,8 +209,9 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
items: BufferSize.values,
|
||||
labelBuilder: (v) => v.name.toUpperCase(),
|
||||
onChanged: (v) {
|
||||
if (v != null)
|
||||
if (v != null) {
|
||||
ref.read(iptvSettingsProvider.notifier).setBufferSize(v);
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
@@ -208,10 +223,11 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
labelBuilder: (v) =>
|
||||
'${v.name.toUpperCase()} (${ref.read(iptvSettingsProvider).timeoutSeconds}s)',
|
||||
onChanged: (v) {
|
||||
if (v != null)
|
||||
if (v != null) {
|
||||
ref
|
||||
.read(iptvSettingsProvider.notifier)
|
||||
.setConnectionTimeout(v);
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
@@ -231,16 +247,19 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
}
|
||||
},
|
||||
onChanged: (v) {
|
||||
if (v != null)
|
||||
if (v != null) {
|
||||
ref
|
||||
.read(iptvSettingsProvider.notifier)
|
||||
.setTranscodingMode(v);
|
||||
}
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
SwitchListTile(
|
||||
title: const Text('Auto Reconnect',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
title: const Text(
|
||||
'Auto Reconnect',
|
||||
style: TextStyle(color: AppColors.textPrimary),
|
||||
),
|
||||
secondary:
|
||||
const Icon(Icons.refresh, color: AppColors.primary),
|
||||
value: settings.autoReconnect,
|
||||
@@ -373,9 +392,13 @@ class _FilterInput extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label,
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: AppColors.textSecondary)),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: AppColors.textSecondary,
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
controller: controller,
|
||||
style:
|
||||
@@ -476,8 +499,10 @@ class _DropdownSetting<T> extends StatelessWidget {
|
||||
value: value,
|
||||
underline: const SizedBox(),
|
||||
dropdownColor: AppColors.surfaceVariant,
|
||||
icon: const Icon(Icons.arrow_drop_down,
|
||||
color: AppColors.textSecondary),
|
||||
icon: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
color: AppColors.textSecondary,
|
||||
),
|
||||
style: const TextStyle(color: AppColors.textPrimary),
|
||||
items: items.map((item) {
|
||||
return DropdownMenuItem<T>(
|
||||
|
||||
@@ -48,8 +48,11 @@ class MobileScaffold extends ConsumerWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1C1C1E).withOpacity(0.85),
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Colors.white.withOpacity(0.1), width: 0.5)),
|
||||
top: BorderSide(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: BottomNavigationBar(
|
||||
currentIndex: currentIndex,
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ dependencies:
|
||||
intl: ^0.19.0
|
||||
equatable: ^2.0.5
|
||||
shared_preferences: ^2.3.2
|
||||
video_player_win: ^3.2.2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user