mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
47 lines
1.2 KiB
Dart
47 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'core/router/app_router.dart';
|
|
import 'core/theme/app_theme.dart';
|
|
import 'core/theme/app_colors.dart';
|
|
import 'core/providers/theme_provider.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
runApp(const ProviderScope(child: MyApp()));
|
|
}
|
|
|
|
class MyApp extends ConsumerWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final router = ref.watch(routerProvider);
|
|
final themeState = ref.watch(themeProvider);
|
|
|
|
return MaterialApp.router(
|
|
title: 'XtremFlow IPTV',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: AppTheme.lightTheme,
|
|
darkTheme: AppTheme.darkTheme,
|
|
themeMode: themeState.themeMode,
|
|
routerConfig: router,
|
|
builder: (context, child) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
gradient: AppColors.grayGlossyGradient,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.white.withOpacity(0.08),
|
|
blurRadius: 40,
|
|
spreadRadius: 20,
|
|
),
|
|
],
|
|
),
|
|
child: child,
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|