1
0
mirror of https://github.com/stonega/tsacdop synced 2024-12-16 10:22:23 +01:00
tsacdop-podcast-app-android/lib/main.dart
stonegate d3efce463c new file: lib/class/settingstate.dart
modified:   lib/class/sqflite_localpodcast.dart
	modified:   lib/episodes/episodedetail.dart
	modified:   lib/home/appbar/importompl.dart
	modified:   lib/home/appbar/popupmenu.dart
	modified:   lib/home/home.dart
	modified:   lib/home/homescroll.dart
	modified:   lib/main.dart
	modified:   lib/podcasts/podcastlist.dart
	new file:   lib/podcasts/podcastmanage.dart
	modified:   lib/util/episodegrid.dart
	modified:   pubspec.lock
	modified:   pubspec.yaml
Add: reorder podcasts
2020-02-16 16:25:53 +08:00

52 lines
1.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart';
import 'package:provider/provider.dart';
import 'package:flutter/services.dart';
import 'package:flutter_downloader/flutter_downloader.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) => Urlchange()),
ChangeNotifierProvider(create: (context) => ImportOmpl()),
ChangeNotifierProvider(create: (context) => SettingState()),
],
child: MyApp(),
),
);
WidgetsFlutterBinding.ensureInitialized();
await FlutterDownloader.initialize();
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
await FlutterStatusbarcolor.setStatusBarColor(Colors.grey[100]);
if (useWhiteForeground(Colors.grey[100])) {
FlutterStatusbarcolor.setStatusBarWhiteForeground(true);
} else {
FlutterStatusbarcolor.setStatusBarWhiteForeground(false);
}
await FlutterStatusbarcolor.setNavigationBarColor(Colors.grey[100]);
if (useWhiteForeground(Colors.grey[100])) {
FlutterStatusbarcolor.setNavigationBarWhiteForeground(true);
} else {
FlutterStatusbarcolor.setNavigationBarWhiteForeground(false);
}
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'TsacDop',
theme: ThemeData(
primaryColor: Colors.white,
),
home: MyHomePage(),
);
}
}