mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
36 lines
835 B
Dart
36 lines
835 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:qinglong_app/base/theme.dart';
|
|
|
|
import 'module/home/home_page.dart';
|
|
|
|
void main() {
|
|
runApp(
|
|
ProviderScope(
|
|
overrides: [
|
|
themeProvider,
|
|
],
|
|
child: const MyApp(),
|
|
),
|
|
);
|
|
if (Platform.isAndroid) {
|
|
SystemUiOverlayStyle style = const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
|
SystemChrome.setSystemUIOverlayStyle(style);
|
|
}
|
|
}
|
|
|
|
class MyApp extends ConsumerWidget {
|
|
const MyApp({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
return MaterialApp(
|
|
theme: ref.watch<ThemeViewModel>(themeProvider).currentTheme,
|
|
home: HomePage(),
|
|
);
|
|
}
|
|
}
|