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,9 +52,7 @@ class _TransactionListtileState extends State<TransactionListtile> { ...@@ -52,9 +52,7 @@ class _TransactionListtileState extends State<TransactionListtile> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox( Row(
width: 280.0,
child: Row(
children: [ children: [
Container( Container(
width: 50.0, width: 50.0,
...@@ -69,14 +67,16 @@ class _TransactionListtileState extends State<TransactionListtile> { ...@@ -69,14 +67,16 @@ class _TransactionListtileState extends State<TransactionListtile> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( 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( 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}" "${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}"
) )
...@@ -84,9 +84,8 @@ class _TransactionListtileState extends State<TransactionListtile> { ...@@ -84,9 +84,8 @@ class _TransactionListtileState extends State<TransactionListtile> {
), ),
], ],
), ),
),
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.
Please to comment