-
-
Notifications
You must be signed in to change notification settings - Fork 137
/
main.dart
50 lines (43 loc) · 1.43 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
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2019 The FlutterCandies author. All rights reserved.
// Use of this source code is governed by an Apache license that can be found
// in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'extensions/color_extension.dart';
import 'extensions/l10n_extensions.dart';
import 'l10n/gen/app_localizations.dart';
import 'pages/splash_page.dart';
const Color themeColor = Color(0xff00bc56);
String? packageVersion;
void main() {
runApp(const MyApp());
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
onGenerateTitle: (BuildContext context) => context.l10n.appTitle,
theme: ThemeData(
brightness: Brightness.light,
primarySwatch: themeColor.swatch,
textSelectionTheme: const TextSelectionThemeData(
cursorColor: themeColor,
),
),
darkTheme: ThemeData(
brightness: Brightness.dark,
primarySwatch: themeColor.swatch,
textSelectionTheme: const TextSelectionThemeData(
cursorColor: themeColor,
),
),
home: const SplashPage(),
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
);
}
}