firo balance type button changes

This commit is contained in:
Julian 2025-01-29 16:53:55 -06:00
parent 189e1a29b6
commit 6d517afb34
2 changed files with 20 additions and 25 deletions

View file

@ -10,11 +10,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.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/public_private_balance_state_provider.dart';
import '../../../../providers/wallet/wallet_balance_toggle_state_provider.dart'; import '../../../../providers/wallet/wallet_balance_toggle_state_provider.dart';
import '../../../../themes/stack_colors.dart'; import '../../../../themes/stack_colors.dart';
import '../../../../utilities/assets.dart';
import '../../../../utilities/constants.dart'; import '../../../../utilities/constants.dart';
import '../../../../utilities/enums/wallet_balance_toggle_state.dart'; import '../../../../utilities/enums/wallet_balance_toggle_state.dart';
import '../../../../utilities/text_styles.dart'; import '../../../../utilities/text_styles.dart';
@ -86,7 +85,7 @@ class DesktopPrivateBalanceToggleButton extends ConsumerWidget {
return SizedBox( return SizedBox(
height: 22, height: 22,
width: 22, width: 80,
child: MaterialButton( child: MaterialButton(
color: Theme.of(context).extension<StackColors>()!.buttonBackSecondary, color: Theme.of(context).extension<StackColors>()!.buttonBackSecondary,
splashColor: Theme.of(context).extension<StackColors>()!.highlight, splashColor: Theme.of(context).extension<StackColors>()!.highlight,
@ -120,22 +119,12 @@ class DesktopPrivateBalanceToggleButton extends ConsumerWidget {
), ),
), ),
child: Center( child: Center(
child: currentType == FiroType.spark child: FittedBox(
? SvgPicture.asset( child: Text(
Assets.svg.spark, currentType.name.toUpperCase(),
width: 16, style: STextStyles.w500_10(context),
// color: Theme.of(context) ),
// .extension<StackColors>()! ),
// .accentColorYellow,
)
: Image(
image: AssetImage(
currentType == FiroType.public
? Assets.png.glasses
: Assets.png.glassesHidden,
),
width: 16,
),
), ),
), ),
); );

View file

@ -151,6 +151,16 @@ class _WDesktopWalletSummaryState extends ConsumerState<DesktopWalletSummary> {
.textSubtitle1, .textSubtitle1,
), ),
), ),
if (coin is Firo)
const Row(
children: [
DesktopPrivateBalanceToggleButton(),
SizedBox(
width: 8,
),
DesktopBalanceToggleButton(),
],
)
], ],
), ),
const SizedBox( const SizedBox(
@ -163,15 +173,11 @@ class _WDesktopWalletSummaryState extends ConsumerState<DesktopWalletSummary> {
? ref.watch(pCurrentTokenWallet)!.tokenContract.address ? ref.watch(pCurrentTokenWallet)!.tokenContract.address
: null, : null,
), ),
if (coin is Firo) if (coin is! Firo)
const SizedBox( const SizedBox(
width: 8, width: 8,
), ),
if (coin is Firo) const DesktopPrivateBalanceToggleButton(), if (coin is! Firo) const DesktopBalanceToggleButton(),
const SizedBox(
width: 8,
),
const DesktopBalanceToggleButton(),
], ],
); );
}, },