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
View File
@@ -66,6 +66,14 @@ class SendPage extends BasePage {
@override
bool get extendBodyBehindAppBar => true;
@override
Function(BuildContext)? get pushToNextWidget => (context) {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.focusedChild?.unfocus();
}
};
@override
Widget? leading(BuildContext context) {
final _backButton = Icon(
@@ -32,6 +32,14 @@ class SendTemplatePage extends BasePage {
@override
AppBarStyle get appBarStyle => AppBarStyle.transparent;
@override
Function(BuildContext)? get pushToNextWidget => (context) {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.focusedChild?.unfocus();
}
};
@override
Widget trailing(context) => Observer(builder: (_) {
return sendTemplateViewModel.recipients.length > 1