mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
Update trailing icon to open transaction page
This commit is contained in:
parent
1831ebf435
commit
89fe8df459
6 changed files with 33 additions and 1 deletions
BIN
assets/images/solid_desktop_menu.png
Normal file
BIN
assets/images/solid_desktop_menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 390 B |
|
@ -8,6 +8,7 @@ import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
|||
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
||||
import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/privacy_page.dart';
|
||||
|
@ -367,6 +368,7 @@ Future setup(
|
|||
BalancePage(dashboardViewModel: getIt.get<DashboardViewModel>(), settingsStore: getIt.get<SettingsStore>()));
|
||||
|
||||
getIt.registerFactory<DashboardPage>(() => DashboardPage( balancePage: getIt.get<BalancePage>(), walletViewModel: getIt.get<DashboardViewModel>(), addressListViewModel: getIt.get<WalletAddressListViewModel>()));
|
||||
getIt.registerFactory<TransactionsPage>(() => TransactionsPage(dashboardViewModel: getIt.get<DashboardViewModel>()));
|
||||
getIt.registerFactory<ReceivePage>(() => ReceivePage(
|
||||
addressListViewModel: getIt.get<WalletAddressListViewModel>()));
|
||||
getIt.registerFactory<AddressPage>(() => AddressPage(
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:cake_wallet/src/screens/buy/buy_webview_page.dart';
|
|||
import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
||||
import 'package:cake_wallet/src/screens/buy/pre_order_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/desktop_settings/dashboard_settings_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
||||
|
@ -526,6 +527,12 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
|||
case Routes.empty_no_route:
|
||||
return MaterialPageRoute<void>(
|
||||
builder: (_) => SizedBox.shrink());
|
||||
|
||||
case Routes.transactionsPage:
|
||||
return CupertinoPageRoute<void>(
|
||||
settings: settings,
|
||||
fullscreenDialog: true,
|
||||
builder: (_) => getIt.get<TransactionsPage>());
|
||||
|
||||
default:
|
||||
return MaterialPageRoute<void>(
|
||||
|
|
|
@ -84,4 +84,5 @@ class Routes {
|
|||
static const otherSettingsPage = '/other_settings_page';
|
||||
static const advancedPrivacySettings = '/advanced_privacy_settings';
|
||||
static const desktop_actions = '/desktop_actions';
|
||||
static const transactionsPage = '/transactions_page';
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet
|
|||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/transactions_page.dart';
|
||||
import 'package:cake_wallet/src/screens/yat_emoji_id.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
|
@ -57,7 +58,25 @@ class DesktopDashboardPage extends BasePage {
|
|||
|
||||
@override
|
||||
Widget trailing(BuildContext context) {
|
||||
return Image.asset('assets/images/desktop_menu.png', color: Theme.of(context).highlightColor);
|
||||
final iconPath = Image.asset('assets/images/solid_desktop_menu.png',
|
||||
color: Theme.of(context).accentTextTheme.headline2!.backgroundColor!);
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
String? currentPath;
|
||||
|
||||
desktopKey.currentState?.popUntil((route) {
|
||||
currentPath = route.settings.name;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (currentPath == Routes.transactionsPage) {
|
||||
return Navigator.pop(desktopKey.currentContext!);
|
||||
}
|
||||
|
||||
desktopKey.currentState!.pushNamed(Routes.transactionsPage);
|
||||
},
|
||||
child: iconPath,
|
||||
);
|
||||
}
|
||||
|
||||
final BalancePage balancePage;
|
||||
|
|
|
@ -2,6 +2,8 @@ import 'package:cake_wallet/routes.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/router.dart' as Router;
|
||||
|
||||
GlobalKey<NavigatorState> desktopKey = GlobalKey<NavigatorState>();
|
||||
|
||||
class DesktopDashboardView extends StatelessWidget {
|
||||
final Widget balancePage;
|
||||
|
||||
|
@ -19,6 +21,7 @@ class DesktopDashboardView extends StatelessWidget {
|
|||
Expanded(
|
||||
flex: 5,
|
||||
child: Navigator(
|
||||
key: desktopKey,
|
||||
initialRoute: Routes.desktop_actions,
|
||||
onGenerateRoute: (settings) => Router.createRoute(settings),
|
||||
onGenerateInitialRoutes: (NavigatorState navigator, String initialRouteName) {
|
||||
|
|
Loading…
Reference in a new issue