1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| Widget _buildForm() { return Form( key: controller.formKey, autovalidateMode: AutovalidateMode.onUserInteraction, child: <Widget>[ TextFormWidget( autofocus: true, controller: controller.userNameController, labelText: LocaleKeys.registerFormName.tr, validator: Validatorless.multiple([ Validatorless.required(LocaleKeys.validatorRequired.tr), Validatorless.min( 3, LocaleKeys.validatorMin.trParams({"size": "3"})), Validatorless.max( 20, LocaleKeys.validatorMax.trParams({"size": "20"})), ]), ).paddingBottom(AppSpace.listRow.w),
TextFormWidget( controller: controller.passwordController, labelText: LocaleKeys.registerFormPassword.tr, isObscure: true, validator: Validatorless.multiple([ Validatorless.required(LocaleKeys.validatorRequired.tr), Validators.password( 6, 18, LocaleKeys.validatorPassword.trParams( {"min": "6", "max": "18"}, ), ), ]), ).paddingBottom(AppSpace.listRow.w * 2),
TextWidget.body1(LocaleKeys.loginForgotPassword.tr) .alignRight() .paddingBottom(50.w),
ButtonWidget.primary( LocaleKeys.loginSignIn.tr, onTap: controller.onSignIn, ).paddingBottom(30.w),
TextWidget.body1(LocaleKeys.loginOrText.tr).paddingBottom(30.w),
<Widget>[ ButtonWidget.iconTextOutlined( IconWidget.svg(AssetsSvgs.facebookSvg), "Facebook", borderColor: AppColors.surfaceVariant, width: 149.w, height: 44.w, ), ButtonWidget.iconTextOutlined( IconWidget.svg(AssetsSvgs.googleSvg), "Google", borderColor: AppColors.surfaceVariant, width: 149.w, height: 44.w, ), ].toRow( mainAxisAlignment: MainAxisAlignment.spaceAround, ),
].toColumn(), ).paddingAll(AppSpace.card); }
|