mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-30 11:54:22 +01:00
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:
@@ -1,4 +1,5 @@
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cake_wallet/utils/route_aware.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/di.dart';
|
||||
@@ -32,6 +33,14 @@ abstract class BasePage extends StatelessWidget {
|
||||
|
||||
Widget? get endDrawer => null;
|
||||
|
||||
Function(BuildContext context)? get pushToWidget => null;
|
||||
|
||||
Function(BuildContext context)? get pushToNextWidget => null;
|
||||
|
||||
Function(BuildContext context)? get popWidget => null;
|
||||
|
||||
Function(BuildContext context)? get popNextWidget => null;
|
||||
|
||||
AppBarStyle get appBarStyle => AppBarStyle.regular;
|
||||
|
||||
Widget Function(BuildContext, Widget)? get rootWrapper => null;
|
||||
@@ -162,15 +171,21 @@ abstract class BasePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final root = Scaffold(
|
||||
key: _scaffoldKey,
|
||||
backgroundColor: pageBackgroundColor(context),
|
||||
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
|
||||
extendBodyBehindAppBar: extendBodyBehindAppBar,
|
||||
endDrawer: endDrawer,
|
||||
appBar: appBar(context),
|
||||
body: body(context),
|
||||
floatingActionButton: floatingActionButton(context));
|
||||
final root = RouteAwareWidget(
|
||||
child: Scaffold(
|
||||
key: _scaffoldKey,
|
||||
backgroundColor: pageBackgroundColor(context),
|
||||
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
|
||||
extendBodyBehindAppBar: extendBodyBehindAppBar,
|
||||
endDrawer: endDrawer,
|
||||
appBar: appBar(context),
|
||||
body: body(context),
|
||||
floatingActionButton: floatingActionButton(context)),
|
||||
pushToWidget: (context) => pushToWidget?.call(context),
|
||||
pushToNextWidget: (context) => pushToNextWidget?.call(context),
|
||||
popWidget: (context) => popWidget?.call(context),
|
||||
popNextWidget: (context) => popNextWidget?.call(context),
|
||||
);
|
||||
|
||||
return rootWrapper?.call(context, root) ?? root;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user