mirror of
https://github.com/A-Star100/simpliplay-android.git
synced 2025-09-18 06:29:39 +00:00
Add files via upload
This commit is contained in:
parent
7d07c2facd
commit
772a464407
107
contrib/flutter/example-fork/main.dart
Normal file
107
contrib/flutter/example-fork/main.dart
Normal file
@ -0,0 +1,107 @@
|
||||
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.lightBlue, // Light Blue primary color
|
||||
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.lightBlue)
|
||||
.copyWith(secondary: Colors.lightBlue),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.lightBlue,
|
||||
titleTextStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.lightBlue, // Light Blue for text buttons
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.lightBlue, // Light Blue for borders
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.lightBlue, // Light Blue for focused border
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: ThemeData.light().copyWith(
|
||||
primaryColor: Colors.lightBlue, // Light Blue primary color
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.lightBlue)
|
||||
.copyWith(secondary: Colors.lightBlue),
|
||||
appBarTheme: AppBarTheme(
|
||||
color: Colors.lightBlue,
|
||||
titleTextStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.lightBlue, // Light Blue for text buttons
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.lightBlue, // Light Blue for borders
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.lightBlue, // Light Blue for focused border
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
home: Scaffold(
|
||||
body: VideoScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user