mirror of
https://github.com/stonega/tsacdop
synced 2024-12-16 10:22:23 +01:00
6e7f7bd071
modified: lib/episodes/episodedetail.dart modified: lib/main.dart
63 lines
2.1 KiB
Dart
63 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_downloader/flutter_downloader.dart';
|
|
import 'package:tsacdop/class/podcast_group.dart';
|
|
import 'package:tsacdop/home/appbar/addpodcast.dart';
|
|
import 'package:tsacdop/class/audiostate.dart';
|
|
import 'package:tsacdop/class/importompl.dart';
|
|
import 'package:tsacdop/class/settingstate.dart';
|
|
|
|
void main() async {
|
|
runApp(
|
|
MultiProvider(
|
|
providers: [
|
|
ChangeNotifierProvider(create: (context) => AudioPlayer()),
|
|
ChangeNotifierProvider(create: (context) => ImportOmpl()),
|
|
ChangeNotifierProvider(create: (context) => SettingState()),
|
|
ChangeNotifierProvider(create: (context) => GroupList()),
|
|
],
|
|
child: MyApp(),
|
|
),
|
|
);
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await FlutterDownloader.initialize();
|
|
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var theme = Provider.of<SettingState>(context).theme;
|
|
print(theme);
|
|
return MaterialApp(
|
|
themeMode: ThemeMode.system,
|
|
debugShowCheckedModeBanner: false,
|
|
title: 'TsacDop',
|
|
theme: ThemeData(
|
|
accentColorBrightness: Brightness.dark,
|
|
primaryColor: Colors.grey[100],
|
|
accentColor: Colors.blue[400],
|
|
primaryColorLight: Colors.white,
|
|
primaryColorDark: Colors.grey[300],
|
|
dialogBackgroundColor: Colors.white,
|
|
backgroundColor: Colors.grey[100],
|
|
appBarTheme: AppBarTheme(
|
|
color: Colors.grey[100],
|
|
elevation: 0,
|
|
),
|
|
textTheme: TextTheme(
|
|
headline1: TextStyle(fontSize: 72.0, fontWeight: FontWeight.bold),
|
|
bodyText2: TextStyle(fontSize: 15.0, fontWeight: FontWeight.normal),
|
|
),
|
|
tabBarTheme: TabBarTheme(
|
|
labelColor: Colors.black,
|
|
unselectedLabelColor: Colors.grey[400],
|
|
),
|
|
),
|
|
darkTheme: ThemeData.dark().copyWith(accentColor: Colors.blue[400],),
|
|
home: MyHomePage(),
|
|
);
|
|
}
|
|
}
|