CW-636-1-Unfocus text fields when push to next one (#1460)

* unfocus text fields when push to next one

* unfocus when push to next from new wallet / restore pages[skip ci]]
This commit is contained in:
Serhii
2024-05-31 17:57:40 +03:00
committed by GitHub
parent 43a4477b39
commit 287c2d8b60
10 changed files with 90 additions and 24 deletions
+8 -8
View File
@@ -10,10 +10,10 @@ class RouteAwareWidget extends StatefulWidget {
this.popNextWidget});
final Widget child;
final Function()? pushToWidget;
final Function()? pushToNextWidget;
final Function()? popWidget;
final Function()? popNextWidget;
final Function(BuildContext context)? pushToWidget;
final Function(BuildContext context)? pushToNextWidget;
final Function(BuildContext context)? popWidget;
final Function(BuildContext context)? popNextWidget;
@override
State<RouteAwareWidget> createState() => RouteAwareWidgetState();
@@ -35,28 +35,28 @@ class RouteAwareWidgetState extends State<RouteAwareWidget> with RouteAware {
@override
void didPush() {
if (widget.pushToWidget != null) {
widget.pushToWidget!();
widget.pushToWidget!(context);
}
}
@override
void didPushNext() {
if (widget.pushToNextWidget != null) {
widget.pushToNextWidget!();
widget.pushToNextWidget!(context);
}
}
@override
void didPop() {
if (widget.popWidget != null) {
widget.popWidget!();
widget.popWidget!(context);
}
}
@override
void didPopNext() {
if (widget.popNextWidget != null) {
widget.popNextWidget!();
widget.popNextWidget!(context);
}
}