app_localizations.dart
23.5 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
import 'app_localizations_en.dart';
import 'app_localizations_zh.dart';
// ignore_for_file: type=lint
/// Callers can lookup localized strings with an instance of AppLocalizations
/// returned by `AppLocalizations.of(context)`.
///
/// Applications need to include `AppLocalizations.delegate()` in their app's
/// `localizationDelegates` list, and the locales they support in the app's
/// `supportedLocales` list. For example:
///
/// ```dart
/// import 'gen/app_localizations.dart';
///
/// return MaterialApp(
/// localizationsDelegates: AppLocalizations.localizationsDelegates,
/// supportedLocales: AppLocalizations.supportedLocales,
/// home: MyApplicationHome(),
/// );
/// ```
///
/// ## Update pubspec.yaml
///
/// Please make sure to update your pubspec.yaml to include the following
/// packages:
///
/// ```yaml
/// dependencies:
/// # Internationalization support.
/// flutter_localizations:
/// sdk: flutter
/// intl: any # Use the pinned version from flutter_localizations
///
/// # Rest of dependencies
/// ```
///
/// ## iOS Applications
///
/// iOS applications define key application metadata, including supported
/// locales, in an Info.plist file that is built into the application bundle.
/// To configure the locales supported by your app, you’ll need to edit this
/// file.
///
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
/// Then, in the Project Navigator, open the Info.plist file under the Runner
/// project’s Runner folder.
///
/// Next, select the Information Property List item, select Add Item from the
/// Editor menu, then select Localizations from the pop-up menu.
///
/// Select and expand the newly-created Localizations item then, for each
/// locale your application supports, add a new item and select the locale
/// you wish to add from the pop-up menu in the Value field. This list should
/// be consistent with the languages listed in the AppLocalizations.supportedLocales
/// property.
abstract class AppLocalizations {
AppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
final String localeName;
static AppLocalizations? of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations);
}
static const LocalizationsDelegate<AppLocalizations> delegate =
_AppLocalizationsDelegate();
/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('en'),
Locale('zh')
];
/// App名称
///
/// In zh, this message translates to:
/// **'Double Feel'**
String get appName;
/// No description provided for @confirm.
///
/// In zh, this message translates to:
/// **'确认'**
String get confirm;
/// No description provided for @cancel.
///
/// In zh, this message translates to:
/// **'取消'**
String get cancel;
/// No description provided for @continueButton.
///
/// In zh, this message translates to:
/// **'继续'**
String get continueButton;
/// No description provided for @loading.
///
/// In zh, this message translates to:
/// **'加载中...'**
String get loading;
/// No description provided for @success.
///
/// In zh, this message translates to:
/// **'成功'**
String get success;
/// No description provided for @error.
///
/// In zh, this message translates to:
/// **'错误'**
String get error;
/// No description provided for @loginTitle.
///
/// In zh, this message translates to:
/// **'登录'**
String get loginTitle;
/// No description provided for @username.
///
/// In zh, this message translates to:
/// **'用户名'**
String get username;
/// No description provided for @password.
///
/// In zh, this message translates to:
/// **'密码'**
String get password;
/// No description provided for @loginBtn.
///
/// In zh, this message translates to:
/// **'立即登录'**
String get loginBtn;
/// No description provided for @usernameEmptyHint.
///
/// In zh, this message translates to:
/// **'用户名不能为空'**
String get usernameEmptyHint;
/// No description provided for @passwordEmptyHint.
///
/// In zh, this message translates to:
/// **'密码不能为空'**
String get passwordEmptyHint;
/// No description provided for @homeTitle.
///
/// In zh, this message translates to:
/// **'首页'**
String get homeTitle;
/// No description provided for @tabToday.
///
/// In zh, this message translates to:
/// **'今日'**
String get tabToday;
/// No description provided for @tabTrend.
///
/// In zh, this message translates to:
/// **'趋势'**
String get tabTrend;
/// No description provided for @tabFriends.
///
/// In zh, this message translates to:
/// **'好友'**
String get tabFriends;
/// No description provided for @tabMy.
///
/// In zh, this message translates to:
/// **'我的'**
String get tabMy;
/// No description provided for @switchLanguage.
///
/// In zh, this message translates to:
/// **'切换语言'**
String get switchLanguage;
/// No description provided for @settings.
///
/// In zh, this message translates to:
/// **'设置'**
String get settings;
/// No description provided for @onboardingIntroTitle.
///
/// In zh, this message translates to:
/// **'DoubleFeel 是专为 Apple Watch 打造的健康陪伴app'**
String get onboardingIntroTitle;
/// No description provided for @onboardingIntroBody.
///
/// In zh, this message translates to:
/// **'我们希望可以帮助你\n<em>关注自己的身心变化,也让爱你的人</em>及时发现你的<em>疲惫与需要</em>'**
String get onboardingIntroBody;
/// No description provided for @onboardingStateQuestion.
///
/// In zh, this message translates to:
/// **'请问以下哪些描述,经常发生在你身上?'**
String get onboardingStateQuestion;
/// No description provided for @onboardingStateStressAnxiety.
///
/// In zh, this message translates to:
/// **'经常压力焦虑'**
String get onboardingStateStressAnxiety;
/// No description provided for @onboardingStateTired.
///
/// In zh, this message translates to:
/// **'容易感到疲惫'**
String get onboardingStateTired;
/// No description provided for @onboardingStatePoorRest.
///
/// In zh, this message translates to:
/// **'睡醒但感觉没休息好'**
String get onboardingStatePoorRest;
/// No description provided for @onboardingStateNeedStimulants.
///
/// In zh, this message translates to:
/// **'需要摄入烟、酒、咖啡等刺激物保持精神'**
String get onboardingStateNeedStimulants;
/// No description provided for @onboardingStateNone.
///
/// In zh, this message translates to:
/// **'以上都没有'**
String get onboardingStateNone;
/// No description provided for @onboardingStressGoalQuestion.
///
/// In zh, this message translates to:
/// **'关于压力,你想通过了解它,获得什么信息?'**
String get onboardingStressGoalQuestion;
/// No description provided for @onboardingStressGoalSource.
///
/// In zh, this message translates to:
/// **'理解压力来源'**
String get onboardingStressGoalSource;
/// No description provided for @onboardingStressGoalReminder.
///
/// In zh, this message translates to:
/// **'有压力及时被提醒'**
String get onboardingStressGoalReminder;
/// No description provided for @onboardingStressGoalLovedOnes.
///
/// In zh, this message translates to:
/// **'让关心自己的人知道压力情况'**
String get onboardingStressGoalLovedOnes;
/// No description provided for @onboardingStressGoalRelax.
///
/// In zh, this message translates to:
/// **'理解压力,让自己变轻松'**
String get onboardingStressGoalRelax;
/// No description provided for @onboardingStressGoalBodyTalk.
///
/// In zh, this message translates to:
/// **'与身体可以更好地对话'**
String get onboardingStressGoalBodyTalk;
/// No description provided for @onboardingReliefQuestion.
///
/// In zh, this message translates to:
/// **'以下哪种方式你认为可以缓解压力?'**
String get onboardingReliefQuestion;
/// No description provided for @onboardingReliefSleep.
///
/// In zh, this message translates to:
/// **'规律的睡眠'**
String get onboardingReliefSleep;
/// No description provided for @onboardingReliefCare.
///
/// In zh, this message translates to:
/// **'亲近的人对自己的关心'**
String get onboardingReliefCare;
/// No description provided for @onboardingReliefExercise.
///
/// In zh, this message translates to:
/// **'多运动'**
String get onboardingReliefExercise;
/// No description provided for @onboardingReliefSun.
///
/// In zh, this message translates to:
/// **'多晒太阳'**
String get onboardingReliefSun;
/// No description provided for @onboardingReliefWater.
///
/// In zh, this message translates to:
/// **'多喝水'**
String get onboardingReliefWater;
/// No description provided for @onboardingReliefMeditation.
///
/// In zh, this message translates to:
/// **'正念冥想'**
String get onboardingReliefMeditation;
/// No description provided for @onboardingKeyDataTitle.
///
/// In zh, this message translates to:
/// **'你知道吗?'**
String get onboardingKeyDataTitle;
/// No description provided for @onboardingKeyDataSubtitle.
///
/// In zh, this message translates to:
/// **'每个人都有一项神奇且关键的身体数据,可以帮助我们:'**
String get onboardingKeyDataSubtitle;
/// No description provided for @onboardingKeyDataStress.
///
/// In zh, this message translates to:
/// **'监测压力'**
String get onboardingKeyDataStress;
/// No description provided for @onboardingKeyDataFatigue.
///
/// In zh, this message translates to:
/// **'避免过劳与身体疲惫'**
String get onboardingKeyDataFatigue;
/// No description provided for @onboardingKeyDataRecovery.
///
/// In zh, this message translates to:
/// **'衡量运动恢复'**
String get onboardingKeyDataRecovery;
/// No description provided for @onboardingKeyDataHabits.
///
/// In zh, this message translates to:
/// **'养成健康生活习惯'**
String get onboardingKeyDataHabits;
/// No description provided for @onboardingKeyDataLovedOnes.
///
/// In zh, this message translates to:
/// **'让重要的人及时关心你的状态'**
String get onboardingKeyDataLovedOnes;
/// No description provided for @onboardingTellMeWhatItIs.
///
/// In zh, this message translates to:
/// **'告诉我Ta是!'**
String get onboardingTellMeWhatItIs;
/// No description provided for @onboardingHrvTitle.
///
/// In zh, this message translates to:
/// **'就是HRV心率变异性'**
String get onboardingHrvTitle;
/// No description provided for @onboardingHrvSubtitle.
///
/// In zh, this message translates to:
/// **'它能帮助我们衡量整体的压力和健康状态'**
String get onboardingHrvSubtitle;
/// No description provided for @onboardingHrvDescription.
///
/// In zh, this message translates to:
/// **'心率变异性(HRV, Heart Rate Variability)即心跳之间间隔时间的微小变化,反映了自主神经系统活动和身体对压力的反应能力'**
String get onboardingHrvDescription;
/// No description provided for @onboardingTellMeMore.
///
/// In zh, this message translates to:
/// **'展开说说'**
String get onboardingTellMeMore;
/// No description provided for @onboardingResearchTitle.
///
/// In zh, this message translates to:
/// **'诸多科学研究表明,HRV变化与我们的身心感受有密切关系'**
String get onboardingResearchTitle;
/// No description provided for @onboardingResearchFatigue.
///
/// In zh, this message translates to:
/// **'身体疲惫'**
String get onboardingResearchFatigue;
/// No description provided for @onboardingResearchEnergy.
///
/// In zh, this message translates to:
/// **'元气满满'**
String get onboardingResearchEnergy;
/// No description provided for @onboardingResearchHrvDown.
///
/// In zh, this message translates to:
/// **'HRV下降'**
String get onboardingResearchHrvDown;
/// No description provided for @onboardingResearchHrvUp.
///
/// In zh, this message translates to:
/// **'HRV上升'**
String get onboardingResearchHrvUp;
/// No description provided for @onboardingHealthPermissionTitle.
///
/// In zh, this message translates to:
/// **'允许访问健康数据'**
String get onboardingHealthPermissionTitle;
/// No description provided for @onboardingHealthPermissionBody.
///
/// In zh, this message translates to:
/// **'DoubleFeel需要连接健康穿戴设备数据,以提醒、统计压力时刻、提供建议。'**
String get onboardingHealthPermissionBody;
/// No description provided for @onboardingHealthPermissionPrivacy.
///
/// In zh, this message translates to:
/// **'请放心,你的健康数据只会存储在本地,我们不上传任何相关数据。'**
String get onboardingHealthPermissionPrivacy;
/// No description provided for @onboardingNotificationTitle.
///
/// In zh, this message translates to:
/// **'开启通知'**
String get onboardingNotificationTitle;
/// No description provided for @onboardingNotificationSubtitle.
///
/// In zh, this message translates to:
/// **'及时了解身体每一次异动'**
String get onboardingNotificationSubtitle;
/// No description provided for @onboardingNotificationBody.
///
/// In zh, this message translates to:
/// **'AppleWatch数据更新后会及时提醒你,帮助你及时行动,改善压力状态'**
String get onboardingNotificationBody;
/// No description provided for @onboardingMemberTitle.
///
/// In zh, this message translates to:
/// **'获得年度会员优惠'**
String get onboardingMemberTitle;
/// No description provided for @onboardingMemberBody.
///
/// In zh, this message translates to:
/// **'开启压力预警与健康陪伴之旅,让爱与关心从不缺席'**
String get onboardingMemberBody;
/// No description provided for @onboardingMemberOriginalPrice.
///
/// In zh, this message translates to:
/// **'原价¥72.00/年'**
String get onboardingMemberOriginalPrice;
/// No description provided for @onboardingMemberCurrentPrice.
///
/// In zh, this message translates to:
/// **'现价 ¥60.00/年'**
String get onboardingMemberCurrentPrice;
/// No description provided for @onboardingMemberMonthlyPrice.
///
/// In zh, this message translates to:
/// **'仅相当于¥5.00/月'**
String get onboardingMemberMonthlyPrice;
/// No description provided for @onboardingMemberAllOptions.
///
/// In zh, this message translates to:
/// **'查看所有购买选项'**
String get onboardingMemberAllOptions;
/// No description provided for @healthCompanionIsNowAvailable.
///
/// In zh, this message translates to:
/// **'健康陪伴已开启'**
String get healthCompanionIsNowAvailable;
/// No description provided for @youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired.
///
/// In zh, this message translates to:
/// **'你们现在可以查看彼此的 HRV、压力与睡眠变化,并在对方疲惫时及时送上关心。'**
String
get youCanNowViewEachOtherSHrvStressLevelsAndSleepPatternsAndReachOutToCheckInWhenTheOtherPersonSeemsTired;
/// No description provided for @bindPartnerTitle.
///
/// In zh, this message translates to:
/// **'添加亲密联系人\n多一个人关注你的健康'**
String get bindPartnerTitle;
/// No description provided for @bindPartnerMyId.
///
/// In zh, this message translates to:
/// **'我的ID'**
String get bindPartnerMyId;
/// No description provided for @bindPartnerShareMyCode.
///
/// In zh, this message translates to:
/// **'分享我的码'**
String get bindPartnerShareMyCode;
/// No description provided for @bindPartnerOr.
///
/// In zh, this message translates to:
/// **'或'**
String get bindPartnerOr;
/// No description provided for @bindPartnerContactId.
///
/// In zh, this message translates to:
/// **'亲密联系人的ID'**
String get bindPartnerContactId;
/// No description provided for @bindPartnerInputHint.
///
/// In zh, this message translates to:
/// **'请输入'**
String get bindPartnerInputHint;
/// No description provided for @bindPartnerSkip.
///
/// In zh, this message translates to:
/// **'下次再说'**
String get bindPartnerSkip;
/// No description provided for @onboardingResearchStress.
///
/// In zh, this message translates to:
/// **'压力大'**
String get onboardingResearchStress;
/// No description provided for @onboardingResearchRelaxed.
///
/// In zh, this message translates to:
/// **'状态轻松'**
String get onboardingResearchRelaxed;
/// No description provided for @onboardingResearchSick.
///
/// In zh, this message translates to:
/// **'感冒生病'**
String get onboardingResearchSick;
/// No description provided for @onboardingResearchHealthy.
///
/// In zh, this message translates to:
/// **'身体倍儿棒'**
String get onboardingResearchHealthy;
/// No description provided for @onboardingResearchPoorSleep.
///
/// In zh, this message translates to:
/// **'睡眠不足'**
String get onboardingResearchPoorSleep;
/// No description provided for @onboardingResearchGoodSleep.
///
/// In zh, this message translates to:
/// **'睡眠充足'**
String get onboardingResearchGoodSleep;
/// 登录页 slogan
///
/// In zh, this message translates to:
/// **'开启压力预警与健康陪伴之旅\n让爱与关心从不缺席'**
String get loginSlogan;
/// 手机号登录按钮
///
/// In zh, this message translates to:
/// **'手机号登录/注册'**
String get loginWithPhone;
/// Apple登录按钮
///
/// In zh, this message translates to:
/// **'通过Apple登录'**
String get loginWithApple;
/// 上次使用标签
///
/// In zh, this message translates to:
/// **'上次使用'**
String get loginLastUsed;
/// 协议勾选前缀
///
/// In zh, this message translates to:
/// **'我已阅读并同意'**
String get loginAgreementPrefix;
/// 用户协议链接
///
/// In zh, this message translates to:
/// **'用户协议'**
String get loginTerms;
/// 协议连接词
///
/// In zh, this message translates to:
/// **'与'**
String get loginAgreementAnd;
/// 隐私协议链接
///
/// In zh, this message translates to:
/// **'隐私协议'**
String get loginPrivacy;
/// 手机号登录页打招呼
///
/// In zh, this message translates to:
/// **'Hello~'**
String get phoneLoginHello;
/// 手机号登录页欢迎语
///
/// In zh, this message translates to:
/// **'欢迎来到 Double Feel'**
String get phoneLoginWelcome;
/// 手机号输入框占位符
///
/// In zh, this message translates to:
/// **'请输入手机号'**
String get phoneLoginPhoneHint;
/// 发送验证码按钮(首次)
///
/// In zh, this message translates to:
/// **'发送验证码'**
String get phoneLoginSendCode;
/// 发送验证码按钮(请求中)
///
/// In zh, this message translates to:
/// **'发送中'**
String get phoneLoginSending;
/// 倒计时文案
///
/// In zh, this message translates to:
/// **'已发送 {countdown}s'**
String phoneLoginSentCountdown(int countdown);
/// 倒计时结束后重新发送按钮
///
/// In zh, this message translates to:
/// **'重新发送'**
String get phoneLoginResend;
/// 验证码输入框占位符
///
/// In zh, this message translates to:
/// **'请输入验证码'**
String get phoneLoginCodeHint;
/// 自动注册提示
///
/// In zh, this message translates to:
/// **'未注册的手机号验证通过后将自动注册'**
String get phoneLoginAutoRegisterHint;
/// 登录按钮 loading 文案
///
/// In zh, this message translates to:
/// **'登录中...'**
String get phoneLoginLoggingIn;
/// 未勾选协议时的 toast
///
/// In zh, this message translates to:
/// **'请先阅读并同意《用户协议》与《隐私协议》'**
String get loginAgreeToTermsToast;
/// 手机号格式错误 toast
///
/// In zh, this message translates to:
/// **'手机号格式错误'**
String get phoneLoginInvalidPhone;
/// 验证码发送成功 toast
///
/// In zh, this message translates to:
/// **'发送成功'**
String get phoneLoginCodeSentSuccess;
/// 验证码格式错误 toast
///
/// In zh, this message translates to:
/// **'验证码格式错误'**
String get phoneLoginInvalidCode;
/// 今日页健康数据授权卡片标题
///
/// In zh, this message translates to:
/// **'无法获取心率健康数据'**
String get todayHealthDataAuthTitle;
/// 今日页健康数据授权卡片说明
///
/// In zh, this message translates to:
/// **'DoubleFeel 需要授权访问你的健康数据,才能提供压力提醒、实时压力统计和健康建议;否则应用功能可能无法正常使用。请放心,你的健康数据仅存储在本地,不会上传到任何服务器。'**
String get todayHealthDataAuthDescription;
/// 今日页健康数据授权卡片按钮文案
///
/// In zh, this message translates to:
/// **'授权访问健康数据'**
String get todayHealthDataAuthAction;
}
class _AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalizations> {
const _AppLocalizationsDelegate();
@override
Future<AppLocalizations> load(Locale locale) {
return SynchronousFuture<AppLocalizations>(lookupAppLocalizations(locale));
}
@override
bool isSupported(Locale locale) =>
<String>['en', 'zh'].contains(locale.languageCode);
@override
bool shouldReload(_AppLocalizationsDelegate old) => false;
}
AppLocalizations lookupAppLocalizations(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'en':
return AppLocalizationsEn();
case 'zh':
return AppLocalizationsZh();
}
throw FlutterError(
'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.');
}