budget: icones carrées tonal (secondaryContainer)
This commit is contained in:
parent
b321ebf7ed
commit
0a04139396
15
lib/app.dart
15
lib/app.dart
|
|
@ -94,13 +94,16 @@ class _YnabAppState extends ConsumerState<YnabApp> {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
DropdownButtonFormField<int>(
|
||||
value: accountId,
|
||||
decoration: const InputDecoration(labelText: 'Compte'),
|
||||
items: accounts
|
||||
.map((a) => DropdownMenuItem(value: a.id, child: Text(a.name)))
|
||||
DropdownMenu<int>(
|
||||
initialSelection: accountId,
|
||||
label: const Text('Compte'),
|
||||
expandedInsets: EdgeInsets.zero,
|
||||
dropdownMenuEntries: accounts
|
||||
.map((a) => DropdownMenuEntry(value: a.id, label: a.name))
|
||||
.toList(),
|
||||
onChanged: (v) => accountId = v,
|
||||
onSelected: (v) {
|
||||
if (v != null) accountId = v;
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -97,16 +97,18 @@ class _AccountCard extends ConsumerWidget {
|
|||
keyboardType: const TextInputType.numberWithOptions(decimal: true),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
DropdownButtonFormField<String>(
|
||||
initialValue: type,
|
||||
decoration: const InputDecoration(labelText: 'Type'),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 'checking', child: Text('Compte courant')),
|
||||
DropdownMenuItem(value: 'savings', child: Text('Épargne')),
|
||||
DropdownMenuItem(value: 'credit', child: Text('Carte de crédit')),
|
||||
DropdownMenuItem(value: 'cash', child: Text('Espèces')),
|
||||
DropdownMenu<String>(
|
||||
initialSelection: type,
|
||||
label: const Text('Type'),
|
||||
enableSearch: false,
|
||||
expandedInsets: EdgeInsets.zero,
|
||||
dropdownMenuEntries: const [
|
||||
DropdownMenuEntry(value: 'checking', label: 'Compte courant'),
|
||||
DropdownMenuEntry(value: 'savings', label: 'Épargne'),
|
||||
DropdownMenuEntry(value: 'credit', label: 'Carte de crédit'),
|
||||
DropdownMenuEntry(value: 'cash', label: 'Espèces'),
|
||||
],
|
||||
onChanged: (v) {
|
||||
onSelected: (v) {
|
||||
if (v != null) {
|
||||
type = v;
|
||||
setDialogState(() {});
|
||||
|
|
|
|||
|
|
@ -176,10 +176,18 @@ class _CategoryRow extends ConsumerWidget {
|
|||
dense: true,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
visualDensity: VisualDensity.compact,
|
||||
leading: Icon(
|
||||
categoryIcon(category.icon),
|
||||
size: 22,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
leading: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
categoryIcon(category.icon),
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
),
|
||||
title: Text(category.name, style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600)),
|
||||
trailing: Text(
|
||||
|
|
|
|||
Loading…
Reference in a new issue