mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-03 17:29:23 +00:00
frost wallet bottom nav bar ui refactor on mobile
This commit is contained in:
parent
3c76cc115c
commit
acccce62a8
2 changed files with 59 additions and 4 deletions
|
@ -84,6 +84,7 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
|||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/buy_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/coin_control_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/frost_sign_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/fusion_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/ordinals_nav_icon.dart';
|
||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/paynym_nav_icon.dart';
|
||||
|
@ -356,7 +357,17 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
}
|
||||
}
|
||||
|
||||
void _onExchangePressed(BuildContext context) async {
|
||||
Future<void> _onFrostSignPressed(BuildContext context) async {
|
||||
// TODO
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (_) => StackOkDialog(
|
||||
title: "TODO FROST SIGN TX",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _onExchangePressed(BuildContext context) async {
|
||||
final Coin coin = ref.read(pWalletCoin(walletId));
|
||||
|
||||
if (coin.isTestNet) {
|
||||
|
@ -401,7 +412,7 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
}
|
||||
}
|
||||
|
||||
void _onBuyPressed(BuildContext context) async {
|
||||
Future<void> _onBuyPressed(BuildContext context) async {
|
||||
final Coin coin = ref.read(pWalletCoin(walletId));
|
||||
|
||||
if (coin.isTestNet) {
|
||||
|
@ -976,6 +987,12 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
}
|
||||
},
|
||||
),
|
||||
if (ref.watch(pWalletCoin(walletId)).isFrost)
|
||||
WalletNavigationBarItemData(
|
||||
label: "Sign",
|
||||
icon: const FrostSignNavIcon(),
|
||||
onTap: () => _onFrostSignPressed(context),
|
||||
),
|
||||
WalletNavigationBarItemData(
|
||||
label: "Send",
|
||||
icon: const SendNavIcon(),
|
||||
|
@ -1007,13 +1024,15 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
);
|
||||
},
|
||||
),
|
||||
if (Constants.enableExchange)
|
||||
if (Constants.enableExchange &&
|
||||
!ref.watch(pWalletCoin(walletId)).isFrost)
|
||||
WalletNavigationBarItemData(
|
||||
label: "Swap",
|
||||
icon: const ExchangeNavIcon(),
|
||||
onTap: () => _onExchangePressed(context),
|
||||
),
|
||||
if (Constants.enableExchange)
|
||||
if (Constants.enableExchange &&
|
||||
!ref.watch(pWalletCoin(walletId)).isFrost)
|
||||
WalletNavigationBarItemData(
|
||||
label: "Buy",
|
||||
icon: const BuyNavIcon(),
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This file is part of Stack Wallet.
|
||||
*
|
||||
* Copyright (c) 2023 Cypher Stack
|
||||
* All Rights Reserved.
|
||||
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
||||
* Generated by Cypher Stack on 2023-05-26
|
||||
*
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:stackwallet/themes/theme_providers.dart';
|
||||
|
||||
class FrostSignNavIcon extends ConsumerWidget {
|
||||
const FrostSignNavIcon({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return SvgPicture.file(
|
||||
File(
|
||||
ref.watch(
|
||||
themeProvider.select(
|
||||
// TODO: [prio=high] update themes with icon asset
|
||||
(value) => value.assets.stackIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
width: 24,
|
||||
height: 24,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue