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

category chip; transaction listtile

parent 2db69d93
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,8 @@ class CategoryChip extends StatelessWidget { ...@@ -12,8 +12,8 @@ class CategoryChip extends StatelessWidget {
margin: const EdgeInsets.only(right: 5.0, bottom: 5.0), margin: const EdgeInsets.only(right: 5.0, bottom: 5.0),
padding: const EdgeInsets.symmetric(horizontal: 7.0, vertical: 3.0), padding: const EdgeInsets.symmetric(horizontal: 7.0, vertical: 3.0),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(width: 0.2), border: Border.all(width: 0.3),
borderRadius: const BorderRadius.all(Radius.circular(3.0)), borderRadius: const BorderRadius.all(Radius.circular(5.0)),
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
......
...@@ -52,41 +52,40 @@ class _TransactionListtileState extends State<TransactionListtile> { ...@@ -52,41 +52,40 @@ class _TransactionListtileState extends State<TransactionListtile> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( Row(
width: 280.0, children: [
child: Row( Container(
children: [ width: 50.0,
Container( height: 50.0,
width: 50.0, decoration: BoxDecoration(
height: 50.0, borderRadius: const BorderRadius.all(Radius.circular(8.0)),
decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: Theme.of(context).colorScheme.surface
),
child: Icon(IconData(category.iconCodePoint, fontFamily: category.iconFontFamily)),
), ),
const SizedBox(width: 17.0), child: Icon(IconData(category.iconCodePoint, fontFamily: category.iconFontFamily)),
Column( ),
crossAxisAlignment: CrossAxisAlignment.start, const SizedBox(width: 17.0),
children: [ Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 200.0,
child: Text(
widget.transaction.title, widget.transaction.title,
overflow: TextOverflow.fade,
style: const TextStyle( style: const TextStyle(
fontSize: 18.0, fontSize: 18.0,
fontWeight: FontWeight.bold 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( Text(
'${widget.transaction.amount.toString()} €', '${widget.transaction.amount.toStringAsFixed(2)} €',
style: TextStyle( style: TextStyle(
color: widget.transaction.amount.isNegative ? Colors.red[700] : Colors.green[700] color: widget.transaction.amount.isNegative ? Colors.red[700] : Colors.green[700]
), ),
...@@ -135,7 +134,7 @@ class _TransactionListtileState extends State<TransactionListtile> { ...@@ -135,7 +134,7 @@ class _TransactionListtileState extends State<TransactionListtile> {
), ),
const SizedBox(height: 20.0), const SizedBox(height: 20.0),
Text( Text(
'${transaction.amount.toString()} €', '${transaction.amount.toStringAsFixed(2)} €',
style: const TextStyle( style: const TextStyle(
fontSize: 40.0, fontSize: 40.0,
fontWeight: FontWeight.w300 fontWeight: FontWeight.w300
......
...@@ -21,7 +21,7 @@ Future<void> setupLocatorService() async { ...@@ -21,7 +21,7 @@ Future<void> setupLocatorService() async {
Map<dynamic, dynamic> appStateMap = appStateBox.toMap(); Map<dynamic, dynamic> appStateMap = appStateBox.toMap();
AppState appState = AppState( AppState appState = AppState(
isFirstOpening: appStateMap['is_first_opening'] ?? true, isFirstOpening: appStateMap['is_first_opening'] ?? true,
detailsTransactionsFilter: appStateMap['details_transactions_filter'] detailsTransactionsFilter: appStateMap['details_transactions_filter'] ?? []
); );
AppStateController appStateController = AppStateController(appStateBox: appStateBox, appState: appState); AppStateController appStateController = AppStateController(appStateBox: appStateBox, appState: appState);
locator.registerLazySingleton<AppStateController>(() => appStateController); 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