mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
keep sign/verify pages loaded (#1703)
This commit is contained in:
parent
647551661d
commit
9edd87b0af
2 changed files with 10 additions and 2 deletions
|
@ -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(),
|
||||
|
@ -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(
|
||||
|
|
|
@ -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(),
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue