Skip to content
Snippets Groups Projects
Commit 2335a05e authored by vjrj's avatar vjrj
Browse files

Only clear form in some cases

parent 67437c52
No related branches found
No related tags found
No related merge requests found
...@@ -79,8 +79,12 @@ class _FirstScreenState extends State<FirstScreen> { ...@@ -79,8 +79,12 @@ class _FirstScreenState extends State<FirstScreen> {
} }
} }
}); });
final PaymentStatus paymentStatus =
context.read<PaymentCubit>().reset(); context.read<PaymentCubit>().state.status;
if (paymentStatus == PaymentStatus.sending ||
paymentStatus == PaymentStatus.isSent) {
context.read<PaymentCubit>().reset();
}
return BlocBuilder<PaymentCubit, PaymentState>( return BlocBuilder<PaymentCubit, PaymentState>(
builder: (BuildContext context, PaymentState state) => builder: (BuildContext context, PaymentState state) =>
Stack(children: <Widget>[ Stack(children: <Widget>[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment