simpliplay-android/flutter-exoplayer/media3_exoplayer_creator/lib/main.dart
2024-12-30 19:08:36 -06:00

109 lines
3.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:media3_exoplayer_creator/screens/video_screen.dart'; // Import other files as needed
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
bool _isDarkMode = false;
void _toggleTheme() {
setState(() {
_isDarkMode = !_isDarkMode;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: _isDarkMode
? ThemeData.dark().copyWith(
primaryColor: Colors.blue,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.lightBlue)
.copyWith(secondary: Colors.blue),
appBarTheme: const AppBarTheme(
color: Colors.blue,
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.blue,
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
),
),
)
: ThemeData.light().copyWith(
primaryColor: Colors.blue,
scaffoldBackgroundColor: Colors.white,
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.lightBlue)
.copyWith(secondary: Colors.blue),
appBarTheme: const AppBarTheme(
color: Colors.blue,
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: Colors.blue,
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
),
),
),
home: Scaffold(
body: VideoScreen(),
),
);
}
}