-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.dart
63 lines (54 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
60
61
62
63
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:app_service/app_service.dart';
import 'app/injections.dart';
import 'app/router.dart';
import 'modules/home/home_view.dart';
import 'modules/home/home_tr.dart';
void main() async {
Get.testMode = true;
WidgetsFlutterBinding.ensureInitialized();
Get.testMode = kDebugMode;
await initDependencies();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final appService = Get.find<AppService>();
return GetMaterialApp(
debugShowCheckedModeBanner: Get.testMode,
title: switch (Get.locale?.toLanguageTag()) {
'zh' => 'AppService 演示 (zh)',
'zh-CN' => 'AppService 演示(陆)',
'zh-HK' => 'AppService 演示(港)',
'zh-MO' => 'AppService 演示(澳)',
'zh-TW' => 'AppService 演示(台)',
'en' => 'AppService Demo (en)',
'en-GB' => 'AppService Dem (GB)',
'en-US' => 'AppService Demo (US)',
'ru' => 'Демонстрация сервиса приложения',
'ru-RU' => 'Демонстрация сервиса приложения',
'ru-BY' => 'Дэма-версія паслугі',
'ru-UA' => 'Демо-версія служби',
'ru-KZ' => 'AppService Демо',
'fr' => 'AppService démonstration (fr)',
'ja' => 'AppServiceデモ (日)',
'ko' => 'App 서비스 데모',
'ar' => 'تطبيق AppService',
_ => 'AppService Demo',
},
theme: appService.currentTheme,
getPages: AppRoutes.routes,
translations: Messages([
AppServiceMessages().keys,
HomeMessages().keys,
]),
locale: Locale(appService.currentLangStr),
fallbackLocale: const Locale('en', 'US'),
home: const HomeView(),
);
}
}