Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Flutter CI

on:
push:
branches:
- main
# push:
# branches:
# - main
pull_request:
branches:
- main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
late GlobalKey<FormState> formKey;
late TextEditingController emailController;
late TextEditingController passwordController;
late FocusNode passwordFocusNode;
bool obscurePassword = true;
bool rememberMe = true;
final showSocialMediaSignin = false;
Expand All @@ -27,13 +28,15 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
formKey = GlobalKey<FormState>();
emailController = TextEditingController();
passwordController = TextEditingController();
passwordFocusNode = FocusNode();
_loadRememberedLogin();
}

@override
void dispose() {
emailController.dispose();
passwordController.dispose();
passwordFocusNode.dispose();
super.dispose();
}

Expand Down Expand Up @@ -142,6 +145,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
enabled: !isLoading,
label: 'auth.email'.tr(),
prefixIcon: const Icon(Icons.email_outlined),
textInputAction: TextInputAction.next,
validator: (v) {
final email = v?.trim();

Expand All @@ -153,10 +157,15 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
}
return null;
},
onFieldSubmitted: (value) {
passwordFocusNode.requestFocus();
},
),
SizedBox(height: AppSpacing.md),
AppTextField(
controller: passwordController,
focusNode: passwordFocusNode,
textInputAction: TextInputAction.done,
enabled: !isLoading,
label: 'auth.password'.tr(),
obscureText: obscurePassword,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
late TextEditingController emailController;
late TextEditingController passwordController;
late TextEditingController confirmPasswordController;
late FocusNode emailFocusNode;
late FocusNode passwordFocusNode;
late FocusNode confirmPasswordFocusNode;
bool obscurePassword = true;
bool obscureConfirmPassword = true;
final showSocialMediaSignin = false;
Expand All @@ -28,6 +31,9 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
emailController = TextEditingController();
passwordController = TextEditingController();
confirmPasswordController = TextEditingController();
emailFocusNode = FocusNode();
passwordFocusNode = FocusNode();
confirmPasswordFocusNode = FocusNode();
}

@override
Expand All @@ -36,6 +42,9 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
emailController.dispose();
passwordController.dispose();
confirmPasswordController.dispose();
emailFocusNode.dispose();
passwordFocusNode.dispose();
confirmPasswordFocusNode.dispose();
super.dispose();
}

Expand Down Expand Up @@ -102,17 +111,23 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
enabled: !isLoading,
label: 'auth.name'.tr(),
prefixIcon: const Icon(Icons.person_outline),
textInputAction: TextInputAction.next,
validator: (v) => AppUtils.isBlank(v?.trim())
? 'auth.name_required'.tr()
: null,
onFieldSubmitted: (value) {
emailFocusNode.requestFocus();
},
),
SizedBox(height: AppSpacing.md),
AppTextField(
controller: emailController,
focusNode: emailFocusNode,
enabled: !isLoading,
keyboardType: TextInputType.emailAddress,
label: 'auth.email'.tr(),
prefixIcon: const Icon(Icons.email_outlined),
textInputAction: TextInputAction.next,
validator: (v) {
final email = v?.trim();

Expand All @@ -124,13 +139,18 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
}
return null;
},
onFieldSubmitted: (value) {
passwordFocusNode.requestFocus();
},
),
SizedBox(height: AppSpacing.md),
AppTextField(
controller: passwordController,
focusNode: passwordFocusNode,
enabled: !isLoading,
label: 'auth.password'.tr(),
obscureText: obscurePassword,
textInputAction: TextInputAction.next,
prefixIcon: const Icon(Icons.lock_outline),
suffixIcon: IconButton(
icon: Icon(
Expand All @@ -153,13 +173,18 @@ class _SignupScreenState extends ConsumerState<SignupScreen> {
}
return null;
},
onFieldSubmitted: (value) {
confirmPasswordFocusNode.requestFocus();
},
),
SizedBox(height: AppSpacing.md),
AppTextField(
controller: confirmPasswordController,
focusNode: confirmPasswordFocusNode,
enabled: !isLoading,
label: 'auth.confirm_password'.tr(),
obscureText: obscureConfirmPassword,
textInputAction: TextInputAction.done,
prefixIcon: const Icon(Icons.lock_outline),
suffixIcon: IconButton(
icon: Icon(
Expand Down