Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep sign/verify pages loaded #1703

Merged
merged 1 commit into from
Sep 26, 2024
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: 5 additions & 1 deletion lib/src/screens/dashboard/widgets/sign_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SignForm extends StatefulWidget {
SignFormState createState() => SignFormState();
}

class SignFormState extends State<SignForm> {
class SignFormState extends State<SignForm> with AutomaticKeepAliveClientMixin {
SignFormState()
: formKey = GlobalKey<FormState>(),
messageController = TextEditingController(),
Expand All @@ -42,8 +42,12 @@ class SignFormState extends State<SignForm> {
super.dispose();
}

@override
bool get wantKeepAlive => true;

@override
Widget build(BuildContext context) {
super.build(context);
return Container(
padding: EdgeInsets.only(left: 24, right: 24),
child: Column(
Expand Down
6 changes: 5 additions & 1 deletion lib/src/screens/dashboard/widgets/verify_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class VerifyForm extends StatefulWidget {
VerifyFormState createState() => VerifyFormState();
}

class VerifyFormState extends State<VerifyForm> {
class VerifyFormState extends State<VerifyForm> with AutomaticKeepAliveClientMixin {
VerifyFormState()
: formKey = GlobalKey<FormState>(),
messageController = TextEditingController(),
Expand All @@ -36,9 +36,13 @@ class VerifyFormState extends State<VerifyForm> {
void dispose() {
super.dispose();
}

@override
bool get wantKeepAlive => true;

@override
Widget build(BuildContext context) {
super.build(context);
return Container(
padding: EdgeInsets.only(left: 24, right: 24),
child: Form(
Expand Down
Loading