Added theme, reworked UI

This commit is contained in:
2024-02-14 23:41:50 +01:00
parent a51ca14041
commit 1a7f28703a
23 changed files with 356 additions and 163 deletions

View File

@@ -6,7 +6,7 @@ class AccountCounter extends StatelessWidget {
const AccountCounter({super.key, required this.accountsTotals});
List<Row> _renderAccountTotals() {
List<Row> _renderAccountTotals(BuildContext context) {
return accountsTotals.entries.toList().map((entry) => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -21,7 +21,7 @@ class AccountCounter extends StatelessWidget {
style: TextStyle(
fontFamily: 'NovaMono',
fontSize: 15,
color: entry.value > 0 ? const Color.fromARGB(255, 0, 255, 8) : Colors.red
color: entry.value > 0 ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.error
)),
],
)).toList();
@@ -33,13 +33,22 @@ class AccountCounter extends StatelessWidget {
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.all(20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Colors.blue
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).colorScheme.primaryContainer,
boxShadow: [
BoxShadow(
color: Theme.of(context).colorScheme.shadow,
blurRadius: 10,
offset: const Offset(2, 2),
spreadRadius: 0.1,
blurStyle: BlurStyle.normal,
)
]
),
alignment: Alignment.centerRight,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: _renderAccountTotals(),
children: _renderAccountTotals(context),
),
);
}