-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a31ab0
commit fccbf74
Showing
4 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
|
|
||
| import 'package:EOEFANS/navigation/app.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:overlay_support/overlay_support.dart'; | ||
|
|
||
| Future<void> main() async { | ||
|
|
||
| } | ||
|
|
||
|
|
||
| class MyApp extends StatelessWidget { | ||
| const MyApp({super.key}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return const OverlaySupport( | ||
| child: FansApp(), | ||
| ); | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,63 @@ | ||
| import 'dart:io'; | ||
|
|
||
| import 'package:EOEFANS/navigation/app.dart'; | ||
| import 'package:EOEFANS/models/videoPageTab.dart'; | ||
| import 'package:EOEFANS/routes/mainPage.dart'; | ||
| import 'package:EOEFANS/routes/setting/aboutUs.dart'; | ||
| import 'package:EOEFANS/routes/setting/settingPage.dart'; | ||
| import 'package:EOEFANS/routes/setting/settingTheme.dart'; | ||
| import 'package:EOEFANS/routes/splashPage.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:overlay_support/overlay_support.dart'; | ||
| import 'package:EOEFANS/states/ProfileChangeNotifier.dart'; | ||
| import 'package:flutter/services.dart'; | ||
| import 'package:provider/provider.dart'; | ||
| import 'package:sentry_flutter/sentry_flutter.dart'; | ||
| import 'package:EOEFANS/common/Api.dart'; | ||
| import 'package:EOEFANS/models/videoPageTab.dart'; | ||
| import 'package:EOEFANS/common/Global.dart'; | ||
|
|
||
| Future<void> main() async { | ||
|
|
||
| Future<void> main() async { | ||
| WidgetsFlutterBinding.ensureInitialized(); | ||
| if (Platform.isAndroid) { | ||
| // 以下两行 设置android状态栏为透明的沉浸。写在组件渲染之后,是为了在渲染后进行set赋值,覆盖状态栏,写在渲染之前MaterialApp组件会覆盖掉这个值。 | ||
| SystemUiOverlayStyle systemUiOverlayStyle = | ||
| SystemUiOverlayStyle(statusBarColor: Colors.transparent); | ||
| SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle); | ||
| } | ||
| await SentryFlutter.init( | ||
| (options) { | ||
| options.dsn = | ||
| 'https://af432d5302db4e71801cf78e91fd5b78@sentry.vtb.link/4'; | ||
| // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. | ||
| // We recommend adjusting this value in production. | ||
| options.tracesSampleRate = 1.0; | ||
| }, | ||
| appRunner: () => Global.init().then((e) => runApp(MyApp())), | ||
| ); | ||
| } | ||
|
|
||
|
|
||
| class MyApp extends StatelessWidget { | ||
| const MyApp({super.key}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return const OverlaySupport( | ||
| child: FansApp(), | ||
| ); | ||
| return MultiProvider( | ||
| providers: [ | ||
| ChangeNotifierProvider.value(value: ThemeModel()), | ||
| ], | ||
| child: Consumer<ThemeModel>( | ||
| builder: (BuildContext context, themeModel, Widget? child) { | ||
| return MaterialApp( | ||
| initialRoute: '/splash', | ||
| theme: ThemeData( | ||
| primarySwatch: Colors.blue, | ||
| ), | ||
| routes: { | ||
| '/main': (BuildContext context) => MainPage(), | ||
| '/splash': (BuildContext context) => SplashScreen(), | ||
| '/setting': (BuildContext context) => const SettingPage(), | ||
| '/theme': (BuildContext context) => const SettingTheme(), | ||
| '/about': (BuildContext context) => const AboutUs(), | ||
| }, | ||
| ); | ||
| })); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters