Template
chore: 初始化脚手架 — sunny_mochi 企业级 Flutter 模板
Core 基础设施:Flavor 三包体系、Drift+SQLCipher 加密数据库 7 拦截器 Dio 网络栈、CrashReporter 崩溃日志、Sealed Failure 错误体系 5 色板主题系统、Auth 认证骨架(Clean Architecture)、Dev Panel、Mock Adapter 通过验证:flutter analyze(0 errors)、flutter test(全绿)、staging APK 74.8MB
This commit is contained in:
@@ -0,0 +1,226 @@
|
||||
///
|
||||
/// Generated file. Do not edit.
|
||||
///
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
// dart format off
|
||||
|
||||
part of 'strings.g.dart';
|
||||
|
||||
// Path: <root>
|
||||
typedef TranslationsZhCn = Translations; // ignore: unused_element
|
||||
class Translations with BaseTranslations<AppLocale, Translations> {
|
||||
/// Returns the current translations of the given [context].
|
||||
///
|
||||
/// Usage:
|
||||
/// final t = Translations.of(context);
|
||||
static Translations of(BuildContext context) => InheritedLocaleData.of<AppLocale, Translations>(context).translations;
|
||||
|
||||
/// You can call this constructor and build your own translation instance of this locale.
|
||||
/// Constructing via the enum [AppLocale.build] is preferred.
|
||||
Translations({Map<String, Node>? overrides, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver, TranslationMetadata<AppLocale, Translations>? meta})
|
||||
: assert(overrides == null, 'Set "translation_overrides: true" in order to enable this feature.'),
|
||||
$meta = meta ?? TranslationMetadata(
|
||||
locale: AppLocale.zhCn,
|
||||
overrides: overrides ?? {},
|
||||
cardinalResolver: cardinalResolver,
|
||||
ordinalResolver: ordinalResolver,
|
||||
) {
|
||||
$meta.setFlatMapFunction(_flatMapFunction);
|
||||
}
|
||||
|
||||
/// Metadata for the translations of <zh-CN>.
|
||||
@override final TranslationMetadata<AppLocale, Translations> $meta;
|
||||
|
||||
/// Access flat map
|
||||
dynamic operator[](String key) => $meta.getTranslation(key);
|
||||
|
||||
late final Translations _root = this; // ignore: unused_field
|
||||
|
||||
Translations $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => Translations(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
late final TranslationsTabZhCn tab = TranslationsTabZhCn.internal(_root);
|
||||
late final TranslationsButtonZhCn button = TranslationsButtonZhCn.internal(_root);
|
||||
late final TranslationsErrorZhCn error = TranslationsErrorZhCn.internal(_root);
|
||||
late final TranslationsEmptyZhCn empty = TranslationsEmptyZhCn.internal(_root);
|
||||
late final TranslationsAuthZhCn auth = TranslationsAuthZhCn.internal(_root);
|
||||
}
|
||||
|
||||
// Path: tab
|
||||
class TranslationsTabZhCn {
|
||||
TranslationsTabZhCn.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// zh-CN: '首页'
|
||||
String get home => '首页';
|
||||
|
||||
/// zh-CN: '我的'
|
||||
String get mine => '我的';
|
||||
}
|
||||
|
||||
// Path: button
|
||||
class TranslationsButtonZhCn {
|
||||
TranslationsButtonZhCn.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// zh-CN: '确定'
|
||||
String get confirm => '确定';
|
||||
|
||||
/// zh-CN: '取消'
|
||||
String get cancel => '取消';
|
||||
|
||||
/// zh-CN: '重试'
|
||||
String get retry => '重试';
|
||||
|
||||
/// zh-CN: '提交'
|
||||
String get submit => '提交';
|
||||
|
||||
/// zh-CN: '保存'
|
||||
String get save => '保存';
|
||||
|
||||
/// zh-CN: '编辑'
|
||||
String get edit => '编辑';
|
||||
|
||||
/// zh-CN: '删除'
|
||||
String get delete => '删除';
|
||||
|
||||
/// zh-CN: '返回'
|
||||
String get back => '返回';
|
||||
|
||||
/// zh-CN: '关闭'
|
||||
String get close => '关闭';
|
||||
|
||||
/// zh-CN: '登录'
|
||||
String get login => '登录';
|
||||
|
||||
/// zh-CN: '退出登录'
|
||||
String get logout => '退出登录';
|
||||
}
|
||||
|
||||
// Path: error
|
||||
class TranslationsErrorZhCn {
|
||||
TranslationsErrorZhCn.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// zh-CN: '出现了一点问题,请稍后重试'
|
||||
String get unknown => '出现了一点问题,请稍后重试';
|
||||
|
||||
/// zh-CN: '网络连接失败,请检查网络'
|
||||
String get network => '网络连接失败,请检查网络';
|
||||
|
||||
/// zh-CN: '请求超时,请稍后重试'
|
||||
String get timeout => '请求超时,请稍后重试';
|
||||
|
||||
/// zh-CN: '服务器开小差了,请稍后重试'
|
||||
String get server => '服务器开小差了,请稍后重试';
|
||||
|
||||
/// zh-CN: '登录已过期,请重新登录'
|
||||
String get auth => '登录已过期,请重新登录';
|
||||
|
||||
/// zh-CN: '请填写必填项'
|
||||
String get empty_input => '请填写必填项';
|
||||
|
||||
/// zh-CN: '请输入有效的手机号'
|
||||
String get invalid_phone => '请输入有效的手机号';
|
||||
}
|
||||
|
||||
// Path: empty
|
||||
class TranslationsEmptyZhCn {
|
||||
TranslationsEmptyZhCn.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// zh-CN: '暂无数据'
|
||||
String get kDefault => '暂无数据';
|
||||
|
||||
/// zh-CN: '列表为空'
|
||||
String get list => '列表为空';
|
||||
}
|
||||
|
||||
// Path: auth
|
||||
class TranslationsAuthZhCn {
|
||||
TranslationsAuthZhCn.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// zh-CN: '欢迎登录'
|
||||
String get login_title => '欢迎登录';
|
||||
|
||||
/// zh-CN: '请输入手机号'
|
||||
String get phone_hint => '请输入手机号';
|
||||
|
||||
/// zh-CN: '请输入验证码'
|
||||
String get code_hint => '请输入验证码';
|
||||
|
||||
/// zh-CN: '请输入密码'
|
||||
String get password_hint => '请输入密码';
|
||||
|
||||
/// zh-CN: '发送验证码'
|
||||
String get send_code => '发送验证码';
|
||||
|
||||
/// zh-CN: '重新发送'
|
||||
String get resend_code => '重新发送';
|
||||
|
||||
/// zh-CN: '短信验证码'
|
||||
String get sms_tab => '短信验证码';
|
||||
|
||||
/// zh-CN: '密码登录'
|
||||
String get pwd_tab => '密码登录';
|
||||
}
|
||||
|
||||
/// The flat map containing all translations for locale <zh-CN>.
|
||||
/// Only for edge cases! For simple maps, use the map function of this library.
|
||||
///
|
||||
/// The Dart AOT compiler has issues with very large switch statements,
|
||||
/// so the map is split into smaller functions (512 entries each).
|
||||
extension on Translations {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'tab.home' => '首页',
|
||||
'tab.mine' => '我的',
|
||||
'button.confirm' => '确定',
|
||||
'button.cancel' => '取消',
|
||||
'button.retry' => '重试',
|
||||
'button.submit' => '提交',
|
||||
'button.save' => '保存',
|
||||
'button.edit' => '编辑',
|
||||
'button.delete' => '删除',
|
||||
'button.back' => '返回',
|
||||
'button.close' => '关闭',
|
||||
'button.login' => '登录',
|
||||
'button.logout' => '退出登录',
|
||||
'error.unknown' => '出现了一点问题,请稍后重试',
|
||||
'error.network' => '网络连接失败,请检查网络',
|
||||
'error.timeout' => '请求超时,请稍后重试',
|
||||
'error.server' => '服务器开小差了,请稍后重试',
|
||||
'error.auth' => '登录已过期,请重新登录',
|
||||
'error.empty_input' => '请填写必填项',
|
||||
'error.invalid_phone' => '请输入有效的手机号',
|
||||
'empty.kDefault' => '暂无数据',
|
||||
'empty.list' => '列表为空',
|
||||
'auth.login_title' => '欢迎登录',
|
||||
'auth.phone_hint' => '请输入手机号',
|
||||
'auth.code_hint' => '请输入验证码',
|
||||
'auth.password_hint' => '请输入密码',
|
||||
'auth.send_code' => '发送验证码',
|
||||
'auth.resend_code' => '重新发送',
|
||||
'auth.sms_tab' => '短信验证码',
|
||||
'auth.pwd_tab' => '密码登录',
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user