2020-02-09 13:29:09 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
2020-02-15 07:39:42 +01:00
|
|
|
import 'package:flutter/services.dart';
|
2020-02-09 13:29:09 +01:00
|
|
|
import 'package:flutter_downloader/flutter_downloader.dart';
|
2020-02-20 10:09:21 +01:00
|
|
|
import 'package:tsacdop/class/podcast_group.dart';
|
2020-02-11 14:48:11 +01:00
|
|
|
import 'package:tsacdop/home/appbar/addpodcast.dart';
|
|
|
|
import 'package:tsacdop/class/audiostate.dart';
|
|
|
|
import 'package:tsacdop/class/importompl.dart';
|
2020-02-16 09:25:53 +01:00
|
|
|
import 'package:tsacdop/class/settingstate.dart';
|
2020-02-09 13:29:09 +01:00
|
|
|
|
|
|
|
void main() async {
|
|
|
|
runApp(
|
|
|
|
MultiProvider(
|
|
|
|
providers: [
|
2020-02-20 16:44:42 +01:00
|
|
|
ChangeNotifierProvider(create: (context) => AudioPlay()),
|
2020-02-11 14:01:57 +01:00
|
|
|
ChangeNotifierProvider(create: (context) => ImportOmpl()),
|
2020-02-16 09:25:53 +01:00
|
|
|
ChangeNotifierProvider(create: (context) => SettingState()),
|
2020-02-20 10:09:21 +01:00
|
|
|
ChangeNotifierProvider(create: (context) => GroupList()),
|
2020-02-09 13:29:09 +01:00
|
|
|
],
|
|
|
|
child: MyApp(),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await FlutterDownloader.initialize();
|
2020-02-15 07:39:42 +01:00
|
|
|
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
2020-02-09 13:29:09 +01:00
|
|
|
await FlutterStatusbarcolor.setStatusBarColor(Colors.grey[100]);
|
|
|
|
await FlutterStatusbarcolor.setNavigationBarColor(Colors.grey[100]);
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-02-20 10:09:21 +01:00
|
|
|
|
2020-02-09 13:29:09 +01:00
|
|
|
return MaterialApp(
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
title: 'TsacDop',
|
|
|
|
theme: ThemeData(
|
|
|
|
primaryColor: Colors.white,
|
|
|
|
),
|
|
|
|
home: MyHomePage(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|