From e38b93ecc74b911190360b6e2cc7d1390b267a42 Mon Sep 17 00:00:00 2001 From: snehmehta Date: Tue, 9 Jan 2024 18:11:44 +0530 Subject: [PATCH] fix keyboard hides textfield --- lib/framework/data_context.dart | 2 ++ lib/framework/view/page.dart | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/framework/data_context.dart b/lib/framework/data_context.dart index 976aa9e06..41c43bbb3 100644 --- a/lib/framework/data_context.dart +++ b/lib/framework/data_context.dart @@ -458,9 +458,11 @@ class NativeInvokable extends ActionInvokable { screenName: screenName, pageArgs: inputMap, asModal: true); // how do we handle onModalDismiss in Typescript? } + void closeAllDialogs() { ScreenController().executeAction(buildContext, CloseAllDialogsAction()); } + void showDialog(dynamic widget) { ScreenController() .executeAction(buildContext, ShowDialogAction(widget: widget)); diff --git a/lib/framework/view/page.dart b/lib/framework/view/page.dart index c1d88af15..ca0bae8ad 100644 --- a/lib/framework/view/page.dart +++ b/lib/framework/view/page.dart @@ -408,6 +408,10 @@ class PageState extends State ); } + Widget getBodyContent() => isScrollableView + ? buildScrollablePageContent(hasDrawer) + : buildFixedPageContent(fixedAppBar != null); + Widget rtn = DataScopeWidget( scopeManager: _scopeManager, child: Unfocus( @@ -421,13 +425,17 @@ class PageState extends State // appBar is inside CustomScrollView if defined appBar: fixedAppBar, - body: isScrollableView - ? buildScrollablePageContent(hasDrawer) - : buildFixedPageContent(fixedAppBar != null), + body: footerWidget == null + ? getBodyContent() + : Column( + children: [ + Expanded(child: getBodyContent()), + footerWidget!, + ], + ), bottomNavigationBar: _bottomNavBar, drawer: _drawer, endDrawer: _endDrawer, - bottomSheet: footerWidget, floatingActionButton: closeModalButton, floatingActionButtonLocation: widget._pageModel.pageStyles?['navigationIconPosition'] ==