Fixed compilation
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:pshared/controllers/wallets.dart';
|
||||
|
||||
import 'package:pshared/utils/currency.dart';
|
||||
|
||||
@@ -23,11 +25,13 @@ class BalanceAmount extends StatelessWidget {
|
||||
final textTheme = Theme.of(context).textTheme;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
final currencyBalance = currencyCodeToSymbol(wallet.currency);
|
||||
final wallets = context.read<WalletsController>();
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
wallet.isHidden ? '•••• $currencyBalance' : '${amountToString(wallet.balance)} $currencyBalance',
|
||||
|
||||
wallets.isHidden(wallet.id) ? '•••• $currencyBalance' : '${amountToString(wallet.balance)} $currencyBalance',
|
||||
style: textTheme.headlineSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.onSurface,
|
||||
@@ -37,7 +41,7 @@ class BalanceAmount extends StatelessWidget {
|
||||
GestureDetector(
|
||||
onTap: onToggleVisibility,
|
||||
child: Icon(
|
||||
wallet.isHidden ? Icons.visibility_off : Icons.visibility,
|
||||
wallets.isHidden(wallet.id) ? Icons.visibility_off : Icons.visibility,
|
||||
size: _iconSize,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user