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