mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-30 22:25:54 +00:00
firo balance type button changes
This commit is contained in:
parent
189e1a29b6
commit
6d517afb34
2 changed files with 20 additions and 25 deletions
|
@ -10,11 +10,10 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import '../../../../providers/wallet/public_private_balance_state_provider.dart';
|
||||
import '../../../../providers/wallet/wallet_balance_toggle_state_provider.dart';
|
||||
import '../../../../themes/stack_colors.dart';
|
||||
import '../../../../utilities/assets.dart';
|
||||
import '../../../../utilities/constants.dart';
|
||||
import '../../../../utilities/enums/wallet_balance_toggle_state.dart';
|
||||
import '../../../../utilities/text_styles.dart';
|
||||
|
@ -86,7 +85,7 @@ class DesktopPrivateBalanceToggleButton extends ConsumerWidget {
|
|||
|
||||
return SizedBox(
|
||||
height: 22,
|
||||
width: 22,
|
||||
width: 80,
|
||||
child: MaterialButton(
|
||||
color: Theme.of(context).extension<StackColors>()!.buttonBackSecondary,
|
||||
splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||
|
@ -120,22 +119,12 @@ class DesktopPrivateBalanceToggleButton extends ConsumerWidget {
|
|||
),
|
||||
),
|
||||
child: Center(
|
||||
child: currentType == FiroType.spark
|
||||
? SvgPicture.asset(
|
||||
Assets.svg.spark,
|
||||
width: 16,
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .accentColorYellow,
|
||||
)
|
||||
: Image(
|
||||
image: AssetImage(
|
||||
currentType == FiroType.public
|
||||
? Assets.png.glasses
|
||||
: Assets.png.glassesHidden,
|
||||
),
|
||||
width: 16,
|
||||
),
|
||||
child: FittedBox(
|
||||
child: Text(
|
||||
currentType.name.toUpperCase(),
|
||||
style: STextStyles.w500_10(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -151,6 +151,16 @@ class _WDesktopWalletSummaryState extends ConsumerState<DesktopWalletSummary> {
|
|||
.textSubtitle1,
|
||||
),
|
||||
),
|
||||
if (coin is Firo)
|
||||
const Row(
|
||||
children: [
|
||||
DesktopPrivateBalanceToggleButton(),
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
DesktopBalanceToggleButton(),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -163,15 +173,11 @@ class _WDesktopWalletSummaryState extends ConsumerState<DesktopWalletSummary> {
|
|||
? ref.watch(pCurrentTokenWallet)!.tokenContract.address
|
||||
: null,
|
||||
),
|
||||
if (coin is Firo)
|
||||
if (coin is! Firo)
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
if (coin is Firo) const DesktopPrivateBalanceToggleButton(),
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
const DesktopBalanceToggleButton(),
|
||||
if (coin is! Firo) const DesktopBalanceToggleButton(),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue