From e1ed4c65f6920718f7ffb4c56a8bbcc3be7aa62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=BC=BA?= Date: Sun, 12 Dec 2021 10:13:32 +0800 Subject: [PATCH] add locale to app using intl --- lib/core/auth/login/reset_password_request_page.dart | 2 +- lib/modules/profile/change_password_page.dart | 6 +++--- lib/modules/profile/profile_page.dart | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/auth/login/reset_password_request_page.dart b/lib/core/auth/login/reset_password_request_page.dart index fe1074c..727e324 100644 --- a/lib/core/auth/login/reset_password_request_page.dart +++ b/lib/core/auth/login/reset_password_request_page.dart @@ -58,7 +58,7 @@ class _ResetPasswordRequestPageState extends TbPageState { valueListenable: _showCurrentPasswordNotifier, builder: (BuildContext context, bool showPassword, child) { return FormBuilderTextField( - name: '${S.of(context).currentPassword}', + name: 'currentPassword', obscureText: !showPassword, autofocus: true, validator: FormBuilderValidators.compose([ @@ -75,7 +75,7 @@ class _ChangePasswordPageState extends TbContextState { valueListenable: _showNewPasswordNotifier, builder: (BuildContext context, bool showPassword, child) { return FormBuilderTextField( - name: '${S.of(context).newPassword}', + name: 'newPassword', obscureText: !showPassword, validator: FormBuilderValidators.compose([ FormBuilderValidators.required(context, errorText: '${S.of(context).newPasswordRequireText}') @@ -98,7 +98,7 @@ class _ChangePasswordPageState extends TbContextState { valueListenable: _showNewPassword2Notifier, builder: (BuildContext context, bool showPassword, child) { return FormBuilderTextField( - name: '${S.of(context).newPassword2}', + name: 'newPassword2', obscureText: !showPassword, validator: FormBuilderValidators.compose([ FormBuilderValidators.required(context, errorText: '${S.of(context).newPassword2RequireText}') diff --git a/lib/modules/profile/profile_page.dart b/lib/modules/profile/profile_page.dart index 5c7000d..6085418 100644 --- a/lib/modules/profile/profile_page.dart +++ b/lib/modules/profile/profile_page.dart @@ -81,7 +81,7 @@ class _ProfilePageState extends TbPageState { children: [ SizedBox(height: 16), FormBuilderTextField( - name: '${S.of(context).email}', + name: 'email', validator: FormBuilderValidators.compose([ FormBuilderValidators.required(context, errorText: '${S.of(context).emailRequireText}'), FormBuilderValidators.email(context, errorText: '${S.of(context).emailInvalidText}') @@ -93,7 +93,7 @@ class _ProfilePageState extends TbPageState { ), SizedBox(height: 24), FormBuilderTextField( - name: '${S.of(context).firstName}', + name: 'firstName', decoration: InputDecoration( border: OutlineInputBorder(), labelText: '${S.of(context).firstNameUpper}' @@ -101,7 +101,7 @@ class _ProfilePageState extends TbPageState { ), SizedBox(height: 24), FormBuilderTextField( - name: '${S.of(context).lastName}', + name: 'lastName', decoration: InputDecoration( border: OutlineInputBorder(), labelText: '${S.of(context).lastNameUpper}'