Skip to content

Commit 972773c

Browse files
committed
flutter 3.29.0
1 parent 5d9e4f0 commit 972773c

File tree

15 files changed

+385
-17
lines changed

15 files changed

+385
-17
lines changed

.github/workflows/flutter-drive.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
# https://github.com/marketplace/actions/flutter-action
5353
- uses: subosito/flutter-action@v2
5454
with:
55-
flutter-version: '3.27.0'
55+
flutter-version: '3.29.0'
5656
channel: 'stable' # or: 'dev' or 'beta'
5757
- run: "flutter clean"
5858
- name: "Run Flutter Driver tests"
@@ -76,7 +76,7 @@ jobs:
7676
java-version: "17"
7777
- uses: subosito/flutter-action@v2
7878
with:
79-
flutter-version: '3.27.0'
79+
flutter-version: '3.29.0'
8080
channel: 'stable' # or: 'dev' or 'beta'
8181
- name: "Run Flutter Driver tests"
8282
# GitHub Action for installing, configuring and running Android Emulators (work only Mac OS)
@@ -101,7 +101,7 @@ jobs:
101101
# https://github.com/marketplace/actions/flutter-action
102102
- uses: subosito/flutter-action@v2
103103
with:
104-
flutter-version: '3.27.0'
104+
flutter-version: '3.29.0'
105105
channel: 'stable'
106106
- run: "flutter pub get"
107107
- name: "Run Flutter Accessibility Tests"

README-EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ For web experience, please visit: https://simplezhli.github.io/flutter_deer/
6666

6767
[![flutter_deer driver](https://github.com/simplezhli/flutter_deer/actions/workflows/flutter-drive.yml/badge.svg?branch=master)](https://github.com/simplezhli/flutter_deer/actions/workflows/flutter-drive.yml)
6868

69-
1. Flutter version 3.27.0
69+
1. Flutter version 3.29.0
7070

71-
2. Dart version 3.6.0
71+
2. Dart version 3.7.0
7272

7373
## Precautions to be taken.
7474

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Web体验地址:https://simplezhli.github.io/flutter_deer/
6666

6767
[![flutter_deer driver](https://github.com/simplezhli/flutter_deer/actions/workflows/flutter-drive.yml/badge.svg?branch=master)](https://github.com/simplezhli/flutter_deer/actions/workflows/flutter-drive.yml)
6868

69-
1. Flutter version 3.27.0
69+
1. Flutter version 3.29.0
7070

71-
2. Dart version 3.6.0
71+
2. Dart version 3.7.0
7272

7373
## 注意事项
7474

ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
ignoresPersistentStateOnLaunch = "NO"
4949
debugDocumentVersioning = "YES"
5050
debugServiceExtension = "internal"
51+
enableGPUValidationMode = "1"
5152
allowLocationSimulation = "YES">
5253
<BuildableProductRunnable
5354
runnableDebuggingMode = "0">

l10n.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 文档:https://flutter.dev/docs/development/accessibility-and-localization/internationalization
2-
2+
synthetic-package: false
33
arb-dir: lib/l10n
44
template-arb-file: intl_en.arb
55
output-localization-file: deer_localizations.dart

lib/l10n/deer_localizations.dart

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
import 'dart:async';
2+
3+
import 'package:flutter/foundation.dart';
4+
import 'package:flutter/widgets.dart';
5+
import 'package:flutter_localizations/flutter_localizations.dart';
6+
import 'package:intl/intl.dart' as intl;
7+
8+
import 'deer_localizations_en.dart';
9+
import 'deer_localizations_zh.dart';
10+
11+
// ignore_for_file: type=lint
12+
13+
/// Callers can lookup localized strings with an instance of DeerLocalizations
14+
/// returned by `DeerLocalizations.of(context)`.
15+
///
16+
/// Applications need to include `DeerLocalizations.delegate()` in their app's
17+
/// `localizationDelegates` list, and the locales they support in the app's
18+
/// `supportedLocales` list. For example:
19+
///
20+
/// ```dart
21+
/// import 'l10n/deer_localizations.dart';
22+
///
23+
/// return MaterialApp(
24+
/// localizationsDelegates: DeerLocalizations.localizationsDelegates,
25+
/// supportedLocales: DeerLocalizations.supportedLocales,
26+
/// home: MyApplicationHome(),
27+
/// );
28+
/// ```
29+
///
30+
/// ## Update pubspec.yaml
31+
///
32+
/// Please make sure to update your pubspec.yaml to include the following
33+
/// packages:
34+
///
35+
/// ```yaml
36+
/// dependencies:
37+
/// # Internationalization support.
38+
/// flutter_localizations:
39+
/// sdk: flutter
40+
/// intl: any # Use the pinned version from flutter_localizations
41+
///
42+
/// # Rest of dependencies
43+
/// ```
44+
///
45+
/// ## iOS Applications
46+
///
47+
/// iOS applications define key application metadata, including supported
48+
/// locales, in an Info.plist file that is built into the application bundle.
49+
/// To configure the locales supported by your app, you’ll need to edit this
50+
/// file.
51+
///
52+
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
53+
/// Then, in the Project Navigator, open the Info.plist file under the Runner
54+
/// project’s Runner folder.
55+
///
56+
/// Next, select the Information Property List item, select Add Item from the
57+
/// Editor menu, then select Localizations from the pop-up menu.
58+
///
59+
/// Select and expand the newly-created Localizations item then, for each
60+
/// locale your application supports, add a new item and select the locale
61+
/// you wish to add from the pop-up menu in the Value field. This list should
62+
/// be consistent with the languages listed in the DeerLocalizations.supportedLocales
63+
/// property.
64+
abstract class DeerLocalizations {
65+
DeerLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString());
66+
67+
final String localeName;
68+
69+
static DeerLocalizations? of(BuildContext context) {
70+
return Localizations.of<DeerLocalizations>(context, DeerLocalizations);
71+
}
72+
73+
static const LocalizationsDelegate<DeerLocalizations> delegate = _DeerLocalizationsDelegate();
74+
75+
/// A list of this localizations delegate along with the default localizations
76+
/// delegates.
77+
///
78+
/// Returns a list of localizations delegates containing this delegate along with
79+
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
80+
/// and GlobalWidgetsLocalizations.delegate.
81+
///
82+
/// Additional delegates can be added by appending to this list in
83+
/// MaterialApp. This list does not have to be used at all if a custom list
84+
/// of delegates is preferred or required.
85+
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates = <LocalizationsDelegate<dynamic>>[
86+
delegate,
87+
GlobalMaterialLocalizations.delegate,
88+
GlobalCupertinoLocalizations.delegate,
89+
GlobalWidgetsLocalizations.delegate,
90+
];
91+
92+
/// A list of this localizations delegate's supported locales.
93+
static const List<Locale> supportedLocales = <Locale>[
94+
Locale('en'),
95+
Locale('zh')
96+
];
97+
98+
/// Title for the application
99+
///
100+
/// In en, this message translates to:
101+
/// **'Flutter Deer'**
102+
String get title;
103+
104+
/// Title for the Login page
105+
///
106+
/// In en, this message translates to:
107+
/// **'Verification Code Login'**
108+
String get verificationCodeLogin;
109+
110+
/// Password Login
111+
///
112+
/// In en, this message translates to:
113+
/// **'Password Login'**
114+
String get passwordLogin;
115+
116+
/// Login
117+
///
118+
/// In en, this message translates to:
119+
/// **'Login'**
120+
String get login;
121+
122+
/// Forgot Password
123+
///
124+
/// In en, this message translates to:
125+
/// **'Forgot Password'**
126+
String get forgotPasswordLink;
127+
128+
/// Please enter the password
129+
///
130+
/// In en, this message translates to:
131+
/// **'Please enter the password'**
132+
String get inputPasswordHint;
133+
134+
/// Please input username
135+
///
136+
/// In en, this message translates to:
137+
/// **'Please input username'**
138+
String get inputUsernameHint;
139+
140+
/// No account yet? Register now
141+
///
142+
/// In en, this message translates to:
143+
/// **'No account yet? Register now'**
144+
String get noAccountRegisterLink;
145+
146+
/// Register
147+
///
148+
/// In en, this message translates to:
149+
/// **'Register'**
150+
String get register;
151+
152+
/// Open your account
153+
///
154+
/// In en, this message translates to:
155+
/// **'Open your account'**
156+
String get openYourAccount;
157+
158+
/// Please enter phone number
159+
///
160+
/// In en, this message translates to:
161+
/// **'Please enter phone number'**
162+
String get inputPhoneHint;
163+
164+
/// Please enter verification code
165+
///
166+
/// In en, this message translates to:
167+
/// **'Please enter verification code'**
168+
String get inputVerificationCodeHint;
169+
170+
/// Please input valid mobile phone number
171+
///
172+
/// In en, this message translates to:
173+
/// **'Please input valid mobile phone number'**
174+
String get inputPhoneInvalid;
175+
176+
/// Not really sent, just log in!
177+
///
178+
/// In en, this message translates to:
179+
/// **'Not really sent, just log in!'**
180+
String get verificationButton;
181+
182+
/// Get verification code
183+
///
184+
/// In en, this message translates to:
185+
/// **'Get code'**
186+
String get getVerificationCode;
187+
188+
/// No description provided for @confirm.
189+
///
190+
/// In en, this message translates to:
191+
/// **'Confirm'**
192+
String get confirm;
193+
194+
/// Reset login password
195+
///
196+
/// In en, this message translates to:
197+
/// **'Reset Login Password'**
198+
String get resetLoginPassword;
199+
200+
/// Registered Tips
201+
///
202+
/// In en, this message translates to:
203+
/// **'Unregistered mobile phone number, please '**
204+
String get registeredTips;
205+
}
206+
207+
class _DeerLocalizationsDelegate extends LocalizationsDelegate<DeerLocalizations> {
208+
const _DeerLocalizationsDelegate();
209+
210+
@override
211+
Future<DeerLocalizations> load(Locale locale) {
212+
return SynchronousFuture<DeerLocalizations>(lookupDeerLocalizations(locale));
213+
}
214+
215+
@override
216+
bool isSupported(Locale locale) => <String>['en', 'zh'].contains(locale.languageCode);
217+
218+
@override
219+
bool shouldReload(_DeerLocalizationsDelegate old) => false;
220+
}
221+
222+
DeerLocalizations lookupDeerLocalizations(Locale locale) {
223+
224+
225+
// Lookup logic when only language code is specified.
226+
switch (locale.languageCode) {
227+
case 'en': return DeerLocalizationsEn();
228+
case 'zh': return DeerLocalizationsZh();
229+
}
230+
231+
throw FlutterError(
232+
'DeerLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
233+
'an issue with the localizations generation tool. Please file an issue '
234+
'on GitHub with a reproducible sample app and the gen-l10n configuration '
235+
'that was used.'
236+
);
237+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// ignore: unused_import
2+
import 'package:intl/intl.dart' as intl;
3+
import 'deer_localizations.dart';
4+
5+
// ignore_for_file: type=lint
6+
7+
/// The translations for English (`en`).
8+
class DeerLocalizationsEn extends DeerLocalizations {
9+
DeerLocalizationsEn([String locale = 'en']) : super(locale);
10+
11+
@override
12+
String get title => 'Flutter Deer';
13+
14+
@override
15+
String get verificationCodeLogin => 'Verification Code Login';
16+
17+
@override
18+
String get passwordLogin => 'Password Login';
19+
20+
@override
21+
String get login => 'Login';
22+
23+
@override
24+
String get forgotPasswordLink => 'Forgot Password';
25+
26+
@override
27+
String get inputPasswordHint => 'Please enter the password';
28+
29+
@override
30+
String get inputUsernameHint => 'Please input username';
31+
32+
@override
33+
String get noAccountRegisterLink => 'No account yet? Register now';
34+
35+
@override
36+
String get register => 'Register';
37+
38+
@override
39+
String get openYourAccount => 'Open your account';
40+
41+
@override
42+
String get inputPhoneHint => 'Please enter phone number';
43+
44+
@override
45+
String get inputVerificationCodeHint => 'Please enter verification code';
46+
47+
@override
48+
String get inputPhoneInvalid => 'Please input valid mobile phone number';
49+
50+
@override
51+
String get verificationButton => 'Not really sent, just log in!';
52+
53+
@override
54+
String get getVerificationCode => 'Get code';
55+
56+
@override
57+
String get confirm => 'Confirm';
58+
59+
@override
60+
String get resetLoginPassword => 'Reset Login Password';
61+
62+
@override
63+
String get registeredTips => 'Unregistered mobile phone number, please ';
64+
}

0 commit comments

Comments
 (0)