liukai преди 2 седмици
родител
ревизия
5aa4bec8cb

+ 2 - 0
packages/cpt_auth/lib/modules/auth_login/auth_login_state.dart

@@ -65,4 +65,6 @@ class LoginState {
       isAgreeTerms: isAgreeTerms ?? this.isLoginBtnEnable,
     );
   }
+
+
 }

+ 2 - 1
packages/cpt_auth/lib/modules/auth_login/auth_login_view_model.dart

@@ -1,3 +1,4 @@
+import 'package:cpt_auth/modules/sign_up/sign_up_page.dart';
 import 'package:flutter/material.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -70,7 +71,7 @@ class AuthLoginViewModel extends _$AuthLoginViewModel {
 
   //去注册页面
   void gotoSignUpPage() {
-    ToastEngine.show("去注册页面");
+    SignUpPage.startInstance();
   }
 
   //切换同意按钮

+ 1 - 1
packages/cpt_auth/lib/modules/forgot_input/forgot_input_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'forgot_input_view_model.dart';
 // **************************************************************************
 
 String _$forgotInputViewModelHash() =>
-    r'bb02a71836308ecaf111114fba9d1cdbd5396275';
+    r'5998f4831003ebb7e6ebe822bc002580f13b1962';
 
 /// See also [ForgotInputViewModel].
 @ProviderFor(ForgotInputViewModel)

+ 1 - 1
packages/cpt_auth/lib/modules/forgot_verify/forgot_verify_state.dart

@@ -2,7 +2,7 @@ import 'package:cs_resources/generated/l10n.dart';
 import 'package:flutter/material.dart';
 
 class ForgotVerifyState {
-//表单的校验与数据
+  //表单的校验与数据
   final Map<String, Map<String, dynamic>> formData;
 
   //表单的错误信息展示

+ 1 - 1
packages/cpt_auth/lib/modules/forgot_verify/forgot_verify_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'forgot_verify_view_model.dart';
 // **************************************************************************
 
 String _$forgotVerifyViewModelHash() =>
-    r'4ccebc971866331f140df84ccc403acd956f4f32';
+    r'9ca96e6da48e893d90ed8b0dc939ebae4c1fb940';
 
 /// See also [ForgotVerifyViewModel].
 @ProviderFor(ForgotVerifyViewModel)

+ 304 - 0
packages/cpt_auth/lib/modules/sign_up/sign_up_page.dart

@@ -0,0 +1,304 @@
+
+import 'package:cpt_auth/modules/sign_up/sign_up_state.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/gestures.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_field.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
+
+import '../../router/page/auth_page_router.dart';
+import 'sign_up_view_model.dart';
+
+@RoutePage()
+class SignUpPage extends HookConsumerWidget {
+  const SignUpPage({Key? key}) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({BuildContext? context}) {
+    if (context != null) {
+      context.router.push(const SignUpPageRoute());
+    } else {
+      appRouter.push(const SignUpPageRoute());
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.read(signUpViewModelProvider.notifier);
+    final state = ref.watch(signUpViewModelProvider);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, ""),
+      backgroundColor: context.appColors.backgroundDefault,
+      body: SingleChildScrollView(
+        scrollDirection: Axis.vertical,
+        physics: const BouncingScrollPhysics(),
+        child: Container(
+          margin: const EdgeInsets.symmetric(horizontal: 38),
+          width: double.infinity,
+          child: Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              //顶部图片
+              const MyAssetImage(
+                Assets.authSignUpInputImg,
+                width: 260,
+                height: 170,
+              ).marginOnly(top: 22, bottom: 34),
+
+              // 表单 - 名
+              _buildInputLayout(
+                context,
+                state,
+                "first_name",
+                textInputType: TextInputType.text,
+                textInputAction: TextInputAction.next,
+                errorText: state.firstNameErrorText,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['last_name']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 姓
+              _buildInputLayout(
+                context,
+                state,
+                "last_name",
+                marginTop: 15,
+                textInputType: TextInputType.text,
+                textInputAction: TextInputAction.next,
+                errorText: state.lastNameErrorText,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['email']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 邮箱
+              _buildInputLayout(
+                context,
+                state,
+                "email",
+                marginTop: 15,
+                textInputType: TextInputType.emailAddress,
+                textInputAction: TextInputAction.next,
+                errorText: state.emailErrorText,
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['phone']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 电话
+              Row(
+                mainAxisSize: MainAxisSize.max,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  const MyAssetImage(
+                    Assets.authCountrySg,
+                    width: 45,
+                    height: 30,
+                  ),
+                  MyTextView(
+                    "+65",
+                    textColor: context.appColors.textBlack,
+                    fontSize: 20,
+                    marginLeft: 15,
+                    marginRight: 12,
+                    isFontMedium: true,
+                  ),
+                  //电话输入框
+                  _buildInputLayout(
+                    context,
+                    state,
+                    "phone",
+                    marginTop: 15,
+                    textInputType: TextInputType.number,
+                    textInputAction: TextInputAction.next,
+                    errorText: state.phoneErrorText,
+                    onSubmit: (formKey, value) {
+                      state.formData[formKey]!['focusNode'].unfocus();
+                      FocusScope.of(context).requestFocus(state.formData['password']!['focusNode']);
+                    },
+                  ).expanded(),
+                ],
+              ),
+
+              // 表单 - 重置密码
+              _buildInputLayout(
+                context,
+                state,
+                "password",
+                marginTop: 15,
+                obscureText: !state.pwdVisibility,
+                errorText: state.passwordErrorText,
+                textInputAction: TextInputAction.next,
+                showRightIcon: true,
+                rightWidget: IconButton(
+                  highlightColor: Colors.transparent,
+                  splashColor: Colors.transparent,
+                  icon: state.pwdVisibility
+                      ? const MyAssetImage(
+                    Assets.authPasswordHide,
+                    width: 22.5,
+                    height: 16.5,
+                  )
+                      : const MyAssetImage(
+                    Assets.authPasswordShow,
+                    width: 22.5,
+                    height: 16.5,
+                  ),
+                  onPressed: () {
+                    viewModel.switchPwdVisibility();
+                  },
+                ),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  FocusScope.of(context).requestFocus(state.formData['confirm_password']!['focusNode']);
+                },
+              ),
+
+              // 表单 - 确认密码
+              _buildInputLayout(
+                context,
+                state,
+                "confirm_password",
+                marginTop: 15,
+                obscureText: !state.confirmPwdVisibility,
+                errorText: state.confirmPasswordErrorText,
+                showRightIcon: true,
+                rightWidget: IconButton(
+                  highlightColor: Colors.transparent,
+                  splashColor: Colors.transparent,
+                  icon: state.confirmPwdVisibility
+                      ? const MyAssetImage(
+                    Assets.authPasswordHide,
+                    width: 22.5,
+                    height: 16.5,
+                  )
+                      : const MyAssetImage(
+                    Assets.authPasswordShow,
+                    width: 22.5,
+                    height: 16.5,
+                  ),
+                  onPressed: () {
+                    viewModel.switchConfirmPwdVisibility();
+                  },
+                ),
+                onSubmit: (formKey, value) {
+                  state.formData[formKey]!['focusNode'].unfocus();
+                  viewModel.submitSignUp();
+                },
+              ),
+
+              MyButton(
+                onPressed: viewModel.submitSignUp,
+                text: S.current.next,
+                textColor: Colors.white,
+                backgroundColor: context.appColors.btnBgDefault,
+                fontWeight: FontWeight.w500,
+                type: ClickType.throttle,
+                fontSize: 16,
+                minHeight: 50,
+                radius: 5,
+              ).marginOnly(top: 25, bottom: 25),
+
+              //同意协议
+              Row(
+                mainAxisSize: MainAxisSize.min,
+                children: [
+                  MyAssetImage(
+                    state.isAgreeTerms ? Assets.baseServiceCheckBoxChecked : Assets.baseServiceCheckBoxUncheck,
+                    width: 15.5,
+                    height: 15.5,
+                  ).onTap(viewModel.switchAgreeTerms, padding: 10),
+                  RichText(
+                    text: TextSpan(
+                      children: [
+                        TextSpan(
+                          text: S.current.agree_to,
+                          style: TextStyle(color: context.appColors.textDarkGray, fontWeight: FontWeight.w500, fontSize: 15), // 灰色文本
+                        ),
+                        const TextSpan(
+                          text: " ",
+                        ),
+                        TextSpan(
+                          text: S.current.terms_of_service,
+                          style: TextStyle(color: context.appColors.textPrimary, fontWeight: FontWeight.w500, fontSize: 15), // 蓝色文本
+                          recognizer: TapGestureRecognizer()..onTap = viewModel.gotoTermsPage,
+                        ),
+                      ],
+                    ),
+                  ),
+                ],
+              ).marginOnly(bottom: 35),
+
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 输入框
+  Widget _buildInputLayout(
+      BuildContext context,
+      SignUpState state,
+      String key, {
+        double marginTop = 0,
+        bool? showRightIcon = false, //是否展示右侧的布局
+        Widget? rightWidget, //右侧的布局
+        TextInputType textInputType = TextInputType.text,
+        String? errorText,
+        bool obscureText = false,
+        TextInputAction textInputAction = TextInputAction.done,
+        Function? onSubmit,
+      }) {
+    return IgnoreKeyboardDismiss(
+      child: MyTextField(
+        key,
+        fillBackgroundColor: context.appColors.authFiledBG,
+        state.formData[key]!['value'],
+        hintText: state.formData[key]!['hintText'],
+        hintStyle: TextStyle(
+          color: context.appColors.authFiledHint,
+          fontSize: 16.0,
+          fontWeight: FontWeight.w500,
+        ),
+        controller: state.formData[key]!['controller'],
+        focusNode: state.formData[key]!['focusNode'],
+        margin: EdgeInsets.only(top: marginTop),
+        padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
+        showDivider: false,
+        height: 44,
+        style: TextStyle(
+          color: context.appColors.authFiledText,
+          fontSize: 16.0,
+          fontWeight: FontWeight.w500,
+        ),
+        inputType: textInputType,
+        textInputAction: textInputAction,
+        onSubmit: onSubmit,
+        cursorColor: context.appColors.authFiledText,
+        obscureText: obscureText,
+        errorText: errorText,
+        showLeftIcon: true,
+        showRightIcon: showRightIcon,
+        rightWidget: rightWidget,
+      ),
+    );
+  }
+
+}

+ 107 - 0
packages/cpt_auth/lib/modules/sign_up/sign_up_state.dart

@@ -0,0 +1,107 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:flutter/material.dart';
+
+class SignUpState {
+  //表单的校验与数据
+  final Map<String, Map<String, dynamic>> formData;
+
+  //表单的错误信息展示
+  String? firstNameErrorText;
+  String? lastNameErrorText;
+  String? emailErrorText;
+  String? phoneErrorText;
+  String? passwordErrorText;
+  String? confirmPasswordErrorText;
+
+  //是否明文展示密码
+  bool pwdVisibility;
+
+  bool confirmPwdVisibility;
+
+  bool isAgreeTerms;
+
+  // ===================================  Begin  ↓  ===================================
+
+  SignUpState({
+    Map<String, Map<String, dynamic>>? formData,
+    this.pwdVisibility = false,
+    this.confirmPwdVisibility = false,
+    this.isAgreeTerms = false,
+    this.firstNameErrorText,
+    this.lastNameErrorText,
+    this.emailErrorText,
+    this.phoneErrorText,
+    this.passwordErrorText,
+    this.confirmPasswordErrorText,
+  }) : formData = formData ??
+            {
+              'first_name': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.first_name,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'last_name': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.last_name,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'email': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.email,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'phone': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.mobile_phone,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'password': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.password,
+                'focusNode': FocusNode(),
+                'obsecure': true,
+              },
+              'confirm_password': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.confirm_password,
+                'focusNode': FocusNode(),
+                'obsecure': true,
+              },
+            };
+
+  SignUpState copyWith({
+    String? firstNameErrorText,
+    String? lastNameErrorText,
+    String? emailErrorText,
+    String? phoneErrorText,
+    String? passwordErrorText,
+    String? confirmPasswordErrorText,
+    bool? pwdVisibility,
+    bool? confirmPwdVisibility,
+    bool? isAgreeTerms,
+  }) {
+    return SignUpState(
+      formData: this.formData,
+      isAgreeTerms: isAgreeTerms ?? this.isAgreeTerms,
+      pwdVisibility: pwdVisibility ?? this.pwdVisibility,
+      confirmPwdVisibility: confirmPwdVisibility ?? this.confirmPwdVisibility,
+      firstNameErrorText: firstNameErrorText,
+      lastNameErrorText: lastNameErrorText,
+      emailErrorText: emailErrorText,
+      phoneErrorText: phoneErrorText,
+      passwordErrorText: passwordErrorText,
+      confirmPasswordErrorText: confirmPasswordErrorText,
+    );
+  }
+
+}

+ 199 - 0
packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.dart

@@ -0,0 +1,199 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/util.dart';
+
+import 'sign_up_state.dart';
+
+part 'sign_up_view_model.g.dart';
+
+@riverpod
+class SignUpViewModel extends _$SignUpViewModel {
+  @override
+  SignUpState build() {
+    final state = SignUpState();
+    initListener(state);
+    ref.onDispose(() {
+      onDispose(state);
+    });
+    return state;
+  }
+
+  //提交注册表单
+  void submitSignUp() {
+    state = state.copyWith(
+      firstNameErrorText: null,
+      lastNameErrorText: null,
+      emailErrorText: null,
+      phoneErrorText: null,
+      passwordErrorText: null,
+      confirmPasswordErrorText: null,
+    );
+
+    final FocusNode firstNameFocusNode = state.formData['first_name']!['focusNode'];
+    final FocusNode lastNameFocusNode = state.formData['last_name']!['focusNode'];
+    final FocusNode emailFocusNode = state.formData['email']!['focusNode'];
+    final FocusNode phoneFocusNode = state.formData['phone']!['focusNode'];
+    final FocusNode passwordFocusNode = state.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = state.formData['confirm_password']!['focusNode'];
+
+    firstNameFocusNode.unfocus();
+    lastNameFocusNode.unfocus();
+    emailFocusNode.unfocus();
+    phoneFocusNode.unfocus();
+    passwordFocusNode.unfocus();
+    confirmPasswordFocusNode.unfocus();
+
+    final TextEditingController firstNameController = state.formData['first_name']!['controller'];
+    final TextEditingController lastNameController = state.formData['last_name']!['controller'];
+    final TextEditingController emailController = state.formData['email']!['controller'];
+    final TextEditingController phoneController = state.formData['phone']!['controller'];
+    final TextEditingController passwordController = state.formData['password']!['controller'];
+    final TextEditingController confirmPasswordController = state.formData['confirm_password']!['controller'];
+
+    final firstName = firstNameController.text;
+    final lastName = lastNameController.text;
+    final email = emailController.text;
+    final phone = phoneController.text;
+    final password = passwordController.text;
+    final confirmPassword = confirmPasswordController.text;
+
+    Log.d('当前待提交的 firstName:$firstName lastName:$lastName email:$email phone:$phone password:$password confirmPassword:$confirmPassword');
+
+    if (Utils.isEmpty(firstName)) {
+      state = state.copyWith(firstNameErrorText: "First Name cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(lastName)) {
+      state = state.copyWith(lastNameErrorText: "Last Name cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(email)) {
+      state = state.copyWith(emailErrorText: "Email cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(phone)) {
+      state = state.copyWith(phoneErrorText: "Email cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(password)) {
+      state = state.copyWith(passwordErrorText: "Password cannot be empty!");
+      return;
+    }
+
+    if (Utils.isEmpty(confirmPassword)) {
+      state = state.copyWith(confirmPasswordErrorText: "Confirm Password cannot be empty!");
+      return;
+    }
+
+    if (confirmPassword != password) {
+      state = state.copyWith(confirmPasswordErrorText: "Password mismatch, please check password");
+      return;
+    }
+
+    //执行密码登录
+    ToastEngine.show('准备执行请求发送验证码 firstName:$firstName lastName:$lastName email:$email phone:$phone password:$password confirmPassword:$confirmPassword');
+
+    gotoSignUpVerifyPage();
+
+  }
+
+  //去注册的短信校验页面
+  void gotoSignUpVerifyPage() {
+
+  }
+
+  //切换隐藏显示密码
+  void switchPwdVisibility() {
+    state = state.copyWith(pwdVisibility: !state.pwdVisibility);
+  }
+
+  void switchConfirmPwdVisibility() {
+    state = state.copyWith(confirmPwdVisibility: !state.confirmPwdVisibility);
+  }
+
+  //切换同意按钮
+  void switchAgreeTerms() {
+    state = state.copyWith(isAgreeTerms: !state.isAgreeTerms);
+  }
+
+  void gotoTermsPage() {
+    ToastEngine.show("去协议页面");
+  }
+
+  //初始化监听
+  void initListener(SignUpState initState) {
+    final FocusNode firstNameFocusNode = initState.formData['first_name']!['focusNode'];
+    final FocusNode lastNameFocusNode = initState.formData['last_name']!['focusNode'];
+    final FocusNode emailFocusNode = initState.formData['email']!['focusNode'];
+    final FocusNode phoneFocusNode = initState.formData['phone']!['focusNode'];
+    final FocusNode passwordFocusNode = initState.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = initState.formData['confirm_password']!['focusNode'];
+
+    firstNameFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (firstNameFocusNode.hasFocus) {
+        state = state.copyWith(firstNameErrorText: null);
+      }
+    });
+
+    lastNameFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (lastNameFocusNode.hasFocus) {
+        state = state.copyWith(lastNameErrorText: null);
+      }
+    });
+
+    emailFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (emailFocusNode.hasFocus) {
+        state = state.copyWith(emailErrorText: null);
+      }
+    });
+
+    phoneFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (phoneFocusNode.hasFocus) {
+        state = state.copyWith(phoneErrorText: null);
+      }
+    });
+
+    passwordFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (passwordFocusNode.hasFocus) {
+        state = state.copyWith(passwordErrorText: null);
+      }
+    });
+
+    confirmPasswordFocusNode.addListener(() {
+      // 获取焦点的时候清空错误文本
+      if (confirmPasswordFocusNode.hasFocus) {
+        state = state.copyWith(confirmPasswordErrorText: null);
+      }
+    });
+  }
+
+  //销毁资源
+  void onDispose(SignUpState initState) {
+    final FocusNode firstNameFocusNode = initState.formData['first_name']!['focusNode'];
+    final FocusNode lastNameFocusNode = initState.formData['last_name']!['focusNode'];
+    final FocusNode emailFocusNode = initState.formData['email']!['focusNode'];
+    final FocusNode phoneFocusNode = initState.formData['phone']!['focusNode'];
+    final FocusNode passwordFocusNode = initState.formData['password']!['focusNode'];
+    final FocusNode confirmPasswordFocusNode = initState.formData['confirm_password']!['focusNode'];
+    firstNameFocusNode.dispose();
+    lastNameFocusNode.dispose();
+    emailFocusNode.dispose();
+    phoneFocusNode.dispose();
+    passwordFocusNode.dispose();
+    confirmPasswordFocusNode.dispose();
+
+    Log.d("SignUpViewModel 销毁 onDispose");
+  }
+
+}

+ 26 - 0
packages/cpt_auth/lib/modules/sign_up/sign_up_view_model.g.dart

@@ -0,0 +1,26 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'sign_up_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$signUpViewModelHash() => r'b85704f97138aebd2e6e6abc9ef7efb2c6cbfb2d';
+
+/// See also [SignUpViewModel].
+@ProviderFor(SignUpViewModel)
+final signUpViewModelProvider =
+    AutoDisposeNotifierProvider<SignUpViewModel, SignUpState>.internal(
+  SignUpViewModel.new,
+  name: r'signUpViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$signUpViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$SignUpViewModel = AutoDisposeNotifier<SignUpState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 2 - 0
packages/cpt_auth/lib/router/page/auth_page_router.dart

@@ -6,6 +6,7 @@ import 'package:router/path/router_path.dart';
 import '../../modules/auth_login/auth_login_page.dart';
 import '../../modules/forgot_input/forgot_input_page.dart';
 import '../../modules/forgot_verify/forgot_verify_page.dart';
+import '../../modules/sign_up/sign_up_page.dart';
 
 
 
@@ -21,5 +22,6 @@ class AuthPageRouter extends _$AuthPageRouter {
     CustomRoute(page: AuthLoginPageRoute.page, path: RouterPath.authLogin, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ForgotInputPageRoute.page, path: RouterPath.authForgotInput, transitionsBuilder: applySlideTransition),
     CustomRoute(page: ForgotVerifyPageRoute.page, path: RouterPath.authForgotVerify, transitionsBuilder: applySlideTransition),
+    CustomRoute(page: SignUpPageRoute.page, path: RouterPath.authSignUp, transitionsBuilder: applySlideTransition),
   ];
 }

+ 20 - 0
packages/cpt_auth/lib/router/page/auth_page_router.gr.dart

@@ -33,6 +33,12 @@ abstract class _$AuthPageRouter extends RootStackRouter {
         child: const ForgotVerifyPage(),
       );
     },
+    SignUpPageRoute.name: (routeData) {
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: const SignUpPage(),
+      );
+    },
   };
 }
 
@@ -77,3 +83,17 @@ class ForgotVerifyPageRoute extends PageRouteInfo<void> {
 
   static const PageInfo<void> page = PageInfo<void>(name);
 }
+
+/// generated route for
+/// [SignUpPage]
+class SignUpPageRoute extends PageRouteInfo<void> {
+  const SignUpPageRoute({List<PageRouteInfo>? children})
+      : super(
+          SignUpPageRoute.name,
+          initialChildren: children,
+        );
+
+  static const String name = 'SignUpPageRoute';
+
+  static const PageInfo<void> page = PageInfo<void>(name);
+}

+ 2 - 0
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -29,12 +29,14 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Create New YY Home Account"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "facility": MessageLookupByLibrary.simpleMessage("Facility"),
+        "first_name": MessageLookupByLibrary.simpleMessage("First Name"),
         "forgot_password":
             MessageLookupByLibrary.simpleMessage("Forgot Password?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage(
             "Enter your email and mobile phone number"),
         "form": MessageLookupByLibrary.simpleMessage("Form"),
         "get_code": MessageLookupByLibrary.simpleMessage("Get Code"),
+        "last_name": MessageLookupByLibrary.simpleMessage("Last Name"),
         "login": MessageLookupByLibrary.simpleMessage("Log In"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("Mobile Phone"),
         "next": MessageLookupByLibrary.simpleMessage("Next"),

+ 2 - 0
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -28,10 +28,12 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "facility": MessageLookupByLibrary.simpleMessage("设施"),
+        "first_name": MessageLookupByLibrary.simpleMessage("名"),
         "forgot_password": MessageLookupByLibrary.simpleMessage("忘记密码?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表单"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
+        "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
         "next": MessageLookupByLibrary.simpleMessage("下一步"),

+ 2 - 0
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -28,10 +28,12 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("创建新的 YY Home 账户"),
         "email": MessageLookupByLibrary.simpleMessage("邮箱"),
         "facility": MessageLookupByLibrary.simpleMessage("設施"),
+        "first_name": MessageLookupByLibrary.simpleMessage("名"),
         "forgot_password": MessageLookupByLibrary.simpleMessage("忘记密码?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage("请输入您的邮箱和手机号码"),
         "form": MessageLookupByLibrary.simpleMessage("表單"),
         "get_code": MessageLookupByLibrary.simpleMessage("获取验证码"),
+        "last_name": MessageLookupByLibrary.simpleMessage("姓"),
         "login": MessageLookupByLibrary.simpleMessage("登录"),
         "mobile_phone": MessageLookupByLibrary.simpleMessage("手机号码"),
         "next": MessageLookupByLibrary.simpleMessage("下一步"),

+ 20 - 0
packages/cs_resources/lib/generated/l10n.dart

@@ -270,6 +270,26 @@ class S {
     );
   }
 
+  /// `First Name`
+  String get first_name {
+    return Intl.message(
+      'First Name',
+      name: 'first_name',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Last Name`
+  String get last_name {
+    return Intl.message(
+      'Last Name',
+      name: 'last_name',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

+ 2 - 0
packages/cs_resources/lib/l10n/intl_en.arb

@@ -21,5 +21,7 @@
   "confirm_password": "Confirm Password",
   "password_format": "8 Digits Alphanumeric",
   "get_code": "Get Code",
+  "first_name": "First Name",
+  "last_name": "Last Name",
   "other": "Other"
 }

+ 2 - 0
packages/cs_resources/lib/l10n/intl_zh_CN.arb

@@ -21,5 +21,7 @@
   "confirm_password": "确认密码",
   "password_format": "8位数字或字母",
   "get_code": "获取验证码",
+  "first_name": "名",
+  "last_name": "姓",
   "other": "其他"
 }

+ 2 - 0
packages/cs_resources/lib/l10n/intl_zh_HK.arb

@@ -21,5 +21,7 @@
   "confirm_password": "确认密码",
   "password_format": "8位数字或字母",
   "get_code": "获取验证码",
+  "first_name": "名",
+  "last_name": "姓",
   "other": "其他"
 }