l10n.dart 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. import 'package:flutter/material.dart';
  3. import 'package:intl/intl.dart';
  4. import 'intl/messages_all.dart';
  5. // **************************************************************************
  6. // Generator: Flutter Intl IDE plugin
  7. // Made by Localizely
  8. // **************************************************************************
  9. // ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
  10. // ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
  11. // ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
  12. class S {
  13. S();
  14. static S? _current;
  15. static S get current {
  16. assert(_current != null,
  17. 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
  18. return _current!;
  19. }
  20. static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
  21. static Future<S> load(Locale locale) {
  22. final name = (locale.countryCode?.isEmpty ?? false)
  23. ? locale.languageCode
  24. : locale.toString();
  25. final localeName = Intl.canonicalizedLocale(name);
  26. return initializeMessages(localeName).then((_) {
  27. Intl.defaultLocale = localeName;
  28. final instance = S();
  29. S._current = instance;
  30. return instance;
  31. });
  32. }
  33. static S of(BuildContext context) {
  34. final instance = S.maybeOf(context);
  35. assert(instance != null,
  36. 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
  37. return instance!;
  38. }
  39. static S? maybeOf(BuildContext context) {
  40. return Localizations.of<S>(context, S);
  41. }
  42. /// `Enter your email address`
  43. String get enterYourEmailAddress {
  44. return Intl.message(
  45. 'Enter your email address',
  46. name: 'enterYourEmailAddress',
  47. desc: '',
  48. args: [],
  49. );
  50. }
  51. /// `Welcome back!`
  52. String get accountWelcomeBack {
  53. return Intl.message(
  54. 'Welcome back!',
  55. name: 'accountWelcomeBack',
  56. desc: '',
  57. args: [],
  58. );
  59. }
  60. /// `Email`
  61. String get email {
  62. return Intl.message(
  63. 'Email',
  64. name: 'email',
  65. desc: '',
  66. args: [],
  67. );
  68. }
  69. /// `Cancel`
  70. String get cancel {
  71. return Intl.message(
  72. 'Cancel',
  73. name: 'cancel',
  74. desc: '',
  75. args: [],
  76. );
  77. }
  78. /// `Verify`
  79. String get verify {
  80. return Intl.message(
  81. 'Verify',
  82. name: 'verify',
  83. desc: '',
  84. args: [],
  85. );
  86. }
  87. /// `Invalid email address`
  88. String get invalidEmailAddress {
  89. return Intl.message(
  90. 'Invalid email address',
  91. name: 'invalidEmailAddress',
  92. desc: '',
  93. args: [],
  94. );
  95. }
  96. }
  97. class AppLocalizationDelegate extends LocalizationsDelegate<S> {
  98. const AppLocalizationDelegate();
  99. List<Locale> get supportedLocales {
  100. return const <Locale>[
  101. Locale.fromSubtags(languageCode: 'en'),
  102. ];
  103. }
  104. @override
  105. bool isSupported(Locale locale) => _isSupported(locale);
  106. @override
  107. Future<S> load(Locale locale) => S.load(locale);
  108. @override
  109. bool shouldReload(AppLocalizationDelegate old) => false;
  110. bool _isSupported(Locale locale) {
  111. for (var supportedLocale in supportedLocales) {
  112. if (supportedLocale.languageCode == locale.languageCode) {
  113. return true;
  114. }
  115. }
  116. return false;
  117. }
  118. }