stacked bar graph, edit / remove transaction & budget page base

This commit is contained in:
2024-02-06 23:58:29 +01:00
parent 3abee9ff6f
commit 3610c466d2
25 changed files with 483 additions and 180 deletions

View File

@@ -1,10 +1,30 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:tunas/domains/account/account_bloc.dart';
import 'package:tunas/pages/budgets/widgets/budgets_actions.dart';
class BudgetsPage extends StatelessWidget {
const BudgetsPage({super.key});
@override
Widget build(BuildContext context) {
return const Text('Budgets');
return BlocListener<AccountBloc, AccountState>(
listener: (context, state) {
if (state.showAddDialog) {
// TransactionAddDialog.show(context);
}
},
child: const Flex(
direction: Axis.horizontal,
children: [
Expanded(
child: Column(
children: [
BudgetsActions(),
],
))
],
),
);
}
}

View File

@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:tunas/domains/account/account_bloc.dart';
class BudgetsActions extends StatelessWidget {
const BudgetsActions({super.key});
@override
Widget build(BuildContext context) {
return BlocBuilder<AccountBloc, AccountState>(
builder: (context, state) => Container(
padding: const EdgeInsets.symmetric(vertical: 9, horizontal: 10),
margin: const EdgeInsets.symmetric(vertical: 2, horizontal: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Budgets',
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 35,
),
),
IconButton(
onPressed: () => null,
icon: const Icon(
Icons.add
)
),
],
)
)
);
}
}