diff --git a/lib/src/screens/dashboard/desktop_dashboard_page.dart b/lib/src/screens/dashboard/desktop_dashboard_page.dart index f79d2f9e2..069da201e 100644 --- a/lib/src/screens/dashboard/desktop_dashboard_page.dart +++ b/lib/src/screens/dashboard/desktop_dashboard_page.dart @@ -32,29 +32,32 @@ class DesktopDashboardPage extends StatelessWidget { Widget build(BuildContext context) { _setEffects(context); - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 400, - child: balancePage, - ), - Flexible( - child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 500), - child: Navigator( - key: desktopKey, - initialRoute: Routes.desktop_actions, - onGenerateRoute: (settings) => Router.createRoute(settings), - onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { - return [ - navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! - ]; - }, + return Container( + color: Theme.of(context).backgroundColor, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 400, + child: balancePage, + ), + Flexible( + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 500), + child: Navigator( + key: desktopKey, + initialRoute: Routes.desktop_actions, + onGenerateRoute: (settings) => Router.createRoute(settings), + onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) { + return [ + navigator.widget.onGenerateRoute!(RouteSettings(name: initialRouteName))! + ]; + }, + ), ), ), - ), - ], + ], + ), ); } diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart index ec6ff1a32..7eec1dce6 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart @@ -160,6 +160,7 @@ class DesktopSidebarWrapper extends BasePage { children: [ child, Container( + color: Theme.of(context).backgroundColor, padding: EdgeInsets.all(20), child: Navigator( initialRoute: Routes.support, diff --git a/lib/src/screens/exchange/widgets/exchange_card.dart b/lib/src/screens/exchange/widgets/exchange_card.dart index 40aa679a4..6aa201772 100644 --- a/lib/src/screens/exchange/widgets/exchange_card.dart +++ b/lib/src/screens/exchange/widgets/exchange_card.dart @@ -1,6 +1,8 @@ import 'package:cake_wallet/entities/contact_base.dart'; import 'package:cake_wallet/routes.dart'; +import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/utils/payment_request.dart'; @@ -430,10 +432,10 @@ class ExchangeCardState extends State { padding: EdgeInsets.only(top: 0), child: InkWell( onTap: () async { - final contact = - await Navigator.of(context, - rootNavigator: true) - .pushNamed(Routes + final navigatorState = ResponsiveLayoutUtil.instance.isMobile(context) + ? Navigator.of(context, rootNavigator: true) + : DesktopDashboardPage.desktopKey.currentState!; + final contact = await navigatorState.pushNamed(Routes .pickerAddressBook); if (contact is ContactBase && diff --git a/lib/src/widgets/address_text_field.dart b/lib/src/widgets/address_text_field.dart index 7e0727312..fb041cfeb 100644 --- a/lib/src/widgets/address_text_field.dart +++ b/lib/src/widgets/address_text_field.dart @@ -1,3 +1,5 @@ +import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:flutter/services.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; @@ -209,8 +211,10 @@ class AddressTextField extends StatelessWidget { } Future _presetAddressBookPicker(BuildContext context) async { - final contact = await Navigator.of(context, rootNavigator: true) - .pushNamed(Routes.pickerAddressBook,arguments: selectedCurrency); + final navigatorState = ResponsiveLayoutUtil.instance.isMobile(context) ? Navigator.of(context, rootNavigator: true) + : DesktopDashboardPage.desktopKey.currentState!; + final contact = await navigatorState.pushNamed(Routes.pickerAddressBook,arguments: selectedCurrency); + if (contact is ContactBase && contact.address != null) { controller?.text = contact.address;