-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
38 lines (34 loc) · 1.06 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:ikaros/layout.dart';
import 'package:ikaros/utils/screen_utils.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
// navigatorObservers: [IkarosRouteObserver()],
debugShowCheckedModeBanner: false,
title: 'Ikaros',
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('zh', 'CN'), // 中文简体
],
locale: const Locale('zh', 'CN'),
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
),
home: ScreenUtils.screenWidthGt600(context)
? const DesktopLayout()
: const MobileLayout(),
);
}
}