Skip to content
Snippets Groups Projects
Commit 760c8576 authored by Florian's avatar Florian
Browse files

category chip; transaction listtile

parent 2db69d93
Branches feature/feature6
No related tags found
No related merge requests found
......@@ -12,8 +12,8 @@ class CategoryChip extends StatelessWidget {
margin: const EdgeInsets.only(right: 5.0, bottom: 5.0),
padding: const EdgeInsets.symmetric(horizontal: 7.0, vertical: 3.0),
decoration: BoxDecoration(
border: Border.all(width: 0.2),
borderRadius: const BorderRadius.all(Radius.circular(3.0)),
border: Border.all(width: 0.3),
borderRadius: const BorderRadius.all(Radius.circular(5.0)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
......
......@@ -52,41 +52,40 @@ class _TransactionListtileState extends State<TransactionListtile> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: 280.0,
child: Row(
children: [
Container(
width: 50.0,
height: 50.0,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: Theme.of(context).colorScheme.surface
),
child: Icon(IconData(category.iconCodePoint, fontFamily: category.iconFontFamily)),
Row(
children: [
Container(
width: 50.0,
height: 50.0,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: Theme.of(context).colorScheme.surface
),
const SizedBox(width: 17.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
child: Icon(IconData(category.iconCodePoint, fontFamily: category.iconFontFamily)),
),
const SizedBox(width: 17.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 200.0,
child: Text(
widget.transaction.title,
overflow: TextOverflow.fade,
style: const TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold
),
),
Text(
"${widget.transaction.createdAt.day}.${monthsGer[widget.transaction.createdAt.month - 1]} ${widget.transaction.createdAt.year} · ${widget.transaction.createdAt.hour < 10 ? 0 : ''}${widget.transaction.createdAt.hour}:${widget.transaction.createdAt.minute < 10 ? 0 : ''}${widget.transaction.createdAt.minute}"
)
],
),
],
),
),
Text(
"${widget.transaction.createdAt.day}.${monthsGer[widget.transaction.createdAt.month - 1]} ${widget.transaction.createdAt.year} · ${widget.transaction.createdAt.hour < 10 ? 0 : ''}${widget.transaction.createdAt.hour}:${widget.transaction.createdAt.minute < 10 ? 0 : ''}${widget.transaction.createdAt.minute}"
)
],
),
],
),
Text(
'${widget.transaction.amount.toString()} €',
'${widget.transaction.amount.toStringAsFixed(2)} €',
style: TextStyle(
color: widget.transaction.amount.isNegative ? Colors.red[700] : Colors.green[700]
),
......@@ -135,7 +134,7 @@ class _TransactionListtileState extends State<TransactionListtile> {
),
const SizedBox(height: 20.0),
Text(
'${transaction.amount.toString()} €',
'${transaction.amount.toStringAsFixed(2)} €',
style: const TextStyle(
fontSize: 40.0,
fontWeight: FontWeight.w300
......
......@@ -21,7 +21,7 @@ Future<void> setupLocatorService() async {
Map<dynamic, dynamic> appStateMap = appStateBox.toMap();
AppState appState = AppState(
isFirstOpening: appStateMap['is_first_opening'] ?? true,
detailsTransactionsFilter: appStateMap['details_transactions_filter']
detailsTransactionsFilter: appStateMap['details_transactions_filter'] ?? []
);
AppStateController appStateController = AppStateController(appStateBox: appStateBox, appState: appState);
locator.registerLazySingleton<AppStateController>(() => appStateController);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment