Browse Source

App商家端

wr_2023_business
wurong 2 years ago
parent
commit
f181592ef4
  1. 28
      lib/generated/intl/messages_all.dart
  2. 1613
      lib/generated/intl/messages_en.dart
  3. 1891
      lib/generated/intl/messages_en_US.dart
  4. 1613
      lib/generated/intl/messages_zh_CN.dart
  5. 1613
      lib/generated/intl/messages_zh_Hans_CN.dart
  6. 1602
      lib/generated/intl/messages_zh_Hant_CN.dart
  7. 1608
      lib/generated/intl/messages_zh_TW.dart
  8. 37
      lib/generated/l10n.dart
  9. 14
      lib/home/home_page.dart

28
lib/generated/intl/messages_all.dart

@ -11,6 +11,7 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
import 'package:intl/src/intl_helpers.dart';
@ -24,12 +25,12 @@ import 'messages_zh_TW.dart' as messages_zh_tw;
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => new Future.value(null),
'en_US': () => new Future.value(null),
'zh_CN': () => new Future.value(null),
'zh_Hans_CN': () => new Future.value(null),
'zh_Hant_CN': () => new Future.value(null),
'zh_TW': () => new Future.value(null),
'en': () => new SynchronousFuture(null),
'en_US': () => new SynchronousFuture(null),
'zh_CN': () => new SynchronousFuture(null),
'zh_Hans_CN': () => new SynchronousFuture(null),
'zh_Hant_CN': () => new SynchronousFuture(null),
'zh_TW': () => new SynchronousFuture(null),
};
MessageLookupByLibrary _findExact(String localeName) {
@ -52,19 +53,18 @@ MessageLookupByLibrary _findExact(String localeName) {
}
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName,
(locale) => _deferredLibraries[locale] != null,
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
return new SynchronousFuture(false);
}
var lib = _deferredLibraries[availableLocale];
await (lib == null ? new Future.value(false) : lib());
lib == null ? new SynchronousFuture(false) : lib();
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return new Future.value(true);
return new SynchronousFuture(true);
}
bool _messagesExistFor(String locale) {
@ -76,8 +76,8 @@ bool _messagesExistFor(String locale) {
}
MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
onFailure: (_) => null);
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

1613
lib/generated/intl/messages_en.dart

File diff suppressed because it is too large Load Diff

1891
lib/generated/intl/messages_en_US.dart

File diff suppressed because it is too large Load Diff

1613
lib/generated/intl/messages_zh_CN.dart

File diff suppressed because it is too large Load Diff

1613
lib/generated/intl/messages_zh_Hans_CN.dart

File diff suppressed because it is too large Load Diff

1602
lib/generated/intl/messages_zh_Hant_CN.dart

File diff suppressed because it is too large Load Diff

1608
lib/generated/intl/messages_zh_TW.dart

File diff suppressed because it is too large Load Diff

37
lib/generated/l10n.dart

@ -10,28 +10,43 @@ import 'intl/messages_all.dart';
// ignore_for_file: non_constant_identifier_names, lines_longer_than_80_chars
// ignore_for_file: join_return_with_assignment, prefer_final_in_for_each
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_redundant_argument_values, avoid_escaping_inner_quotes
class S {
S();
static S current;
static S _current;
static const AppLocalizationDelegate delegate =
AppLocalizationDelegate();
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
return _current;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString();
final name = (locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
return initializeMessages(localeName).then((_) {
Intl.defaultLocale = localeName;
S.current = S();
final instance = S();
S._current = instance;
return S.current;
return instance;
});
}
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
return instance;
}
static S maybeOf(BuildContext context) {
return Localizations.of<S>(context, S);
}
@ -7164,8 +7179,10 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
Locale.fromSubtags(languageCode: 'en'),
Locale.fromSubtags(languageCode: 'en', countryCode: 'US'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hans', countryCode: 'CN'),
Locale.fromSubtags(
languageCode: 'zh', scriptCode: 'Hant', countryCode: 'CN'),
Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'),
];
}
@ -7178,13 +7195,11 @@ class AppLocalizationDelegate extends LocalizationsDelegate<S> {
bool shouldReload(AppLocalizationDelegate old) => false;
bool _isSupported(Locale locale) {
if (locale != null) {
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return true;
}
}
}
return false;
}
}

14
lib/home/home_page.dart

@ -100,12 +100,12 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
///
posterShowAlertDialog(ActivityPos activityPos,firstLoginCouponList) {
var today = DateTime.now().day;
SharedPreferences.getInstance().then((value) {
if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
return;
value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};");
value.setInt("today", today);
// var today = DateTime.now().day;
// SharedPreferences.getInstance().then((value) {
// if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
// return;
// value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};");
// value.setInt("today", today);
//
showDialog(
context: context,
@ -113,7 +113,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
return ActivityPoster(activityPos,firstLoginCouponList);
},
);
});
// });
}
///

Loading…
Cancel
Save