处理兼容性问题

处理兼容性问题
This commit is contained in:
Zeus
2023-12-05 09:48:08 +08:00
parent a21a4e7f77
commit fa787018df
641 changed files with 29065 additions and 28 deletions
@@ -0,0 +1,415 @@
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';
/// 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_l10n/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, youll need to edit this
/// file.
///
/// First, open your projects ios/Runner.xcworkspace Xcode workspace file.
/// Then, in the Project Navigator, open the Info.plist file under the Runner
/// projects 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')
];
/// Title for the Demo application
///
/// In en, this message translates to:
/// **'Flutter APP'**
String get title;
/// No description provided for @wodedingyue.
///
/// In en, this message translates to:
/// **'My Subscription'**
String get wodedingyue;
/// No description provided for @guoqi.
///
/// In en, this message translates to:
/// **'Expired'**
String get guoqi;
/// No description provided for @yiyong.
///
/// In en, this message translates to:
/// **'Used'**
String get yiyong;
/// No description provided for @zongji.
///
/// In en, this message translates to:
/// **'Total'**
String get zongji;
/// No description provided for @dinggoutaocan.
///
/// In en, this message translates to:
/// **'Sub Package'**
String get dinggoutaocan;
/// No description provided for @xuangou.
///
/// In en, this message translates to:
/// **'Buy'**
String get xuangou;
/// No description provided for @yidingyue.
///
/// In en, this message translates to:
/// **'Subscribed'**
String get yidingyue;
/// No description provided for @yilianjie.
///
/// In en, this message translates to:
/// **'Connected'**
String get yilianjie;
/// No description provided for @yiduankai.
///
/// In en, this message translates to:
/// **'Disconnected'**
String get yiduankai;
/// No description provided for @qingxiandenglu.
///
/// In en, this message translates to:
/// **'Please login first'**
String get qingxiandenglu;
/// No description provided for @qingxiandingyuetaocan.
///
/// In en, this message translates to:
/// **'Please subscribed first'**
String get qingxiandingyuetaocan;
/// No description provided for @taocanguoqichongxindingyue.
///
/// In en, this message translates to:
/// **'Package has expired, please subscribe again'**
String get taocanguoqichongxindingyue;
/// No description provided for @chagnqiyouxiao.
///
/// In en, this message translates to:
/// **'Subscribed Never Expires'**
String get chagnqiyouxiao;
/// No description provided for @renew.
///
/// In en, this message translates to:
/// **'View'**
String get renew;
/// No description provided for @welcome.
///
/// In en, this message translates to:
/// **'welcome'**
String get welcome;
/// No description provided for @logout.
///
/// In en, this message translates to:
/// **'logout'**
String get logout;
/// No description provided for @xuanzeliahjiedian.
///
/// In en, this message translates to:
/// **'Select Services'**
String get xuanzeliahjiedian;
/// No description provided for @yiduankai2.
///
/// In en, this message translates to:
/// **'Disconnected'**
String get yiduankai2;
/// No description provided for @pleaseenter.
///
/// In en, this message translates to:
/// **'Please enter the correct email address'**
String get pleaseenter;
/// No description provided for @passwordcan.
///
/// In en, this message translates to:
/// **'Password can not be null'**
String get passwordcan;
/// No description provided for @passwordcannot.
///
/// In en, this message translates to:
/// **'Password cannot be less than 6 characters'**
String get passwordcannot;
/// No description provided for @loginfailed.
///
/// In en, this message translates to:
/// **'Login failed, please try again'**
String get loginfailed;
/// No description provided for @registrationfailed.
///
/// In en, this message translates to:
/// **'Registration failed, please try again'**
String get registrationfailed;
/// No description provided for @mail.
///
/// In en, this message translates to:
/// **'Mail'**
String get mail;
/// No description provided for @password.
///
/// In en, this message translates to:
/// **'Password'**
String get password;
/// No description provided for @zhengzailinajie.
///
/// In en, this message translates to:
/// **'Connecting, please wait...'**
String get zhengzailinajie;
/// No description provided for @zhengzaiduankailianjie.
///
/// In en, this message translates to:
/// **'Disconnecting, please wait...'**
String get zhengzaiduankailianjie;
/// No description provided for @confirmpassword.
///
/// In en, this message translates to:
/// **'Confirm Password'**
String get confirmpassword;
/// No description provided for @twopasswords.
///
/// In en, this message translates to:
/// **'Two passwords do not match'**
String get twopasswords;
/// No description provided for @forgetthepassword.
///
/// In en, this message translates to:
/// **'Forget the password?'**
String get forgetthepassword;
/// No description provided for @login.
///
/// In en, this message translates to:
/// **'Login'**
String get login;
/// No description provided for @register.
///
/// In en, this message translates to:
/// **'Register'**
String get register;
/// No description provided for @resetpassword.
///
/// In en, this message translates to:
/// **'Reset Password'**
String get resetpassword;
/// No description provided for @sure.
///
/// In en, this message translates to:
/// **'Sure'**
String get sure;
/// No description provided for @thesystemwill.
///
/// In en, this message translates to:
/// **'The system will send a reset password email to your mailbox, please pay attention to check it'**
String get thesystemwill;
/// No description provided for @sentsuccessfully.
///
/// In en, this message translates to:
/// **'Sent successfully'**
String get sentsuccessfully;
/// No description provided for @returnstring.
///
/// In en, this message translates to:
/// **'Return'**
String get returnstring;
/// No description provided for @qingxuanzefuwqjiedian.
///
/// In en, this message translates to:
/// **'Please select a server node'**
String get qingxuanzefuwqjiedian;
/// No description provided for @pingallnodes.
///
/// In en, this message translates to:
/// **'Click Ping All'**
String get pingallnodes;
/// No description provided for @timeout.
///
/// In en, this message translates to:
/// **'timeout'**
String get timeout;
/// No description provided for @alertsss.
///
/// In en, this message translates to:
/// **'alert'**
String get alertsss;
/// No description provided for @wanttoexit.
///
/// In en, this message translates to:
/// **'Are you sure you want to exit?'**
String get wanttoexit;
/// No description provided for @cancelss.
///
/// In en, this message translates to:
/// **'cancel'**
String get cancelss;
/// No description provided for @exitout.
///
/// In en, this message translates to:
/// **'exit'**
String get exitout;
/// No description provided for @clicktoselectanothernode.
///
/// In en, this message translates to:
/// **'Click to select another node'**
String get clicktoselectanothernode;
/// No description provided for @nodefornullcheckissubscripts.
///
/// In en, this message translates to:
/// **'The Service list is empty, \nPlease Login first.'**
String get nodefornullcheckissubscripts;
/// No description provided for @foreveryfree1.
///
/// In en, this message translates to:
/// **'Notable features of UU: \n * No credit card required\n * You can try premium features for free for 7 days \n* Do not keep any user logs\n* Simple, one-click connection VPN\n* Automatically connects you to the fastest VPN server'**
String get foreveryfree1;
}
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.'
);
}
@@ -0,0 +1,150 @@
import 'app_localizations.dart';
/// The translations for English (`en`).
class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale);
@override
String get title => 'Flutter APP';
@override
String get wodedingyue => 'My Subscription';
@override
String get guoqi => 'Expired';
@override
String get yiyong => 'Used';
@override
String get zongji => 'Total';
@override
String get dinggoutaocan => 'Sub Package';
@override
String get xuangou => 'Buy';
@override
String get yidingyue => 'Subscribed';
@override
String get yilianjie => 'Connected';
@override
String get yiduankai => 'Disconnected';
@override
String get qingxiandenglu => 'Please login first';
@override
String get qingxiandingyuetaocan => 'Please subscribed first';
@override
String get taocanguoqichongxindingyue => 'Package has expired, please subscribe again';
@override
String get chagnqiyouxiao => 'Subscribed Never Expires';
@override
String get renew => 'View';
@override
String get welcome => 'welcome';
@override
String get logout => 'logout';
@override
String get xuanzeliahjiedian => 'Select Services';
@override
String get yiduankai2 => 'Disconnected';
@override
String get pleaseenter => 'Please enter the correct email address';
@override
String get passwordcan => 'Password can not be null';
@override
String get passwordcannot => 'Password cannot be less than 6 characters';
@override
String get loginfailed => 'Login failed, please try again';
@override
String get registrationfailed => 'Registration failed, please try again';
@override
String get mail => 'Mail';
@override
String get password => 'Password';
@override
String get zhengzailinajie => 'Connecting, please wait...';
@override
String get zhengzaiduankailianjie => 'Disconnecting, please wait...';
@override
String get confirmpassword => 'Confirm Password';
@override
String get twopasswords => 'Two passwords do not match';
@override
String get forgetthepassword => 'Forget the password?';
@override
String get login => 'Login';
@override
String get register => 'Register';
@override
String get resetpassword => 'Reset Password';
@override
String get sure => 'Sure';
@override
String get thesystemwill => 'The system will send a reset password email to your mailbox, please pay attention to check it';
@override
String get sentsuccessfully => 'Sent successfully';
@override
String get returnstring => 'Return';
@override
String get qingxuanzefuwqjiedian => 'Please select a server node';
@override
String get pingallnodes => 'Click Ping All';
@override
String get timeout => 'timeout';
@override
String get alertsss => 'alert';
@override
String get wanttoexit => 'Are you sure you want to exit?';
@override
String get cancelss => 'cancel';
@override
String get exitout => 'exit';
@override
String get clicktoselectanothernode => 'Click to select another node';
@override
String get nodefornullcheckissubscripts => 'The Service list is empty, \nPlease Login first.';
@override
String get foreveryfree1 => 'Notable features of UU: \n * No credit card required\n * You can try premium features for free for 7 days \n* Do not keep any user logs\n* Simple, one-click connection VPN\n* Automatically connects you to the fastest VPN server';
}
@@ -0,0 +1,150 @@
import 'app_localizations.dart';
/// The translations for Chinese (`zh`).
class AppLocalizationsZh extends AppLocalizations {
AppLocalizationsZh([String locale = 'zh']) : super(locale);
@override
String get title => 'Flutter APP';
@override
String get wodedingyue => '我的订阅';
@override
String get guoqi => '过期';
@override
String get yiyong => '已用';
@override
String get zongji => '总计';
@override
String get dinggoutaocan => '订阅套餐';
@override
String get xuangou => '购买';
@override
String get yidingyue => '已订购';
@override
String get yilianjie => '已连接';
@override
String get yiduankai => '已断开连接';
@override
String get qingxiandenglu => '请先登录';
@override
String get qingxiandingyuetaocan => '请先订阅下方套餐';
@override
String get taocanguoqichongxindingyue => '套餐已过期,请重新订阅';
@override
String get chagnqiyouxiao => '长期有效';
@override
String get renew => '查看';
@override
String get welcome => '欢迎光临';
@override
String get logout => '退出';
@override
String get xuanzeliahjiedian => '选择连接节点';
@override
String get yiduankai2 => '已断开连接';
@override
String get pleaseenter => '请输入正确邮箱';
@override
String get passwordcan => '密码不能为空';
@override
String get passwordcannot => '密码不能小于6位';
@override
String get loginfailed => '登陆失败,请重试';
@override
String get registrationfailed => '注册失败,请重试';
@override
String get mail => '邮箱';
@override
String get password => '密码';
@override
String get zhengzailinajie => '正在连接中,请稍后...';
@override
String get zhengzaiduankailianjie => '正在断开中,请稍后...';
@override
String get confirmpassword => '确定密码';
@override
String get twopasswords => '两次密码不匹配';
@override
String get forgetthepassword => '忘记密码?';
@override
String get login => '登录';
@override
String get register => '注册';
@override
String get resetpassword => '重置密码';
@override
String get sure => '确定';
@override
String get thesystemwill => '系统将向您的邮箱发送一封重置密码邮件,请注意查收';
@override
String get sentsuccessfully => '发送成功';
@override
String get returnstring => '返回';
@override
String get qingxuanzefuwqjiedian => '请选择服务器节点';
@override
String get pingallnodes => '点击Ping所有节点';
@override
String get timeout => '超时';
@override
String get alertsss => '提示';
@override
String get wanttoexit => '确定退出吗?';
@override
String get cancelss => '取消';
@override
String get exitout => '退出';
@override
String get clicktoselectanothernode => '点击选择其他节点';
@override
String get nodefornullcheckissubscripts => '节点列表为空,请确认是否已经订阅 ';
@override
String get foreveryfree1 => 'Notable features of UU: \n * No credit card required\n * You can try premium features for free for 7 days \n* Do not keep any user logs\n* Simple, one-click connection VPN\n* Automatically connects you to the fastest VPN server';
}
@@ -0,0 +1,3 @@
# Generated by the flutter tool
name: synthetic_package
description: The Flutter application's synthetic package.