BROKEN, nav from wallet view to buy view

This commit is contained in:
sneurlax 2023-01-27 12:01:27 -06:00
parent 957b9cb6a3
commit 59a12fe277
2 changed files with 16 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/buy_view/buy_view.dart';
import 'package:stackwallet/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart';
import 'package:stackwallet/pages/exchange_view/wallet_initiated_exchange_view.dart';
import 'package:stackwallet/pages/home_view/home_view.dart';
@ -772,7 +773,14 @@ class _WalletViewState extends ConsumerState<WalletView> {
),
);
},
onBuyPressed: () {},
onBuyPressed: () {
// TODO set default coin to currently open wallet
// final coin = ref.read(managerProvider).coin;
unawaited(Navigator.of(context).pushNamed(
BuyView.routeName,
));
},
),
),
],

View file

@ -23,6 +23,7 @@ import 'package:stackwallet/pages/address_book_views/subviews/contact_details_vi
import 'package:stackwallet/pages/address_book_views/subviews/edit_contact_address_view.dart';
import 'package:stackwallet/pages/address_book_views/subviews/edit_contact_name_emoji_view.dart';
import 'package:stackwallet/pages/buy_view/buy_quote_preview.dart';
import 'package:stackwallet/pages/buy_view/buy_view.dart';
import 'package:stackwallet/pages/exchange_view/choose_from_stack_view.dart';
import 'package:stackwallet/pages/exchange_view/edit_trade_note_view.dart';
import 'package:stackwallet/pages/exchange_view/exchange_loading_overlay.dart';
@ -1125,6 +1126,12 @@ class RouteGenerator {
builder: (_) => const DesktopExchangeView(),
settings: RouteSettings(name: settings.name));
case BuyView.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
builder: (_) => const BuyView(),
settings: RouteSettings(name: settings.name));
case DesktopBuyView.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,