diff --git a/lib/Overview.dart b/lib/Overview.dart index 06b212c..29317fe 100644 --- a/lib/Overview.dart +++ b/lib/Overview.dart @@ -3,7 +3,6 @@ import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:spritverbrauch/compound_icon.dart'; import 'package:spritverbrauch/item_list_model.dart'; -import 'package:spritverbrauch/list_item.dart'; class Overview extends StatelessWidget { static const padding = 10.0; diff --git a/lib/add_item.dart b/lib/add_item.dart index f290972..7b90441 100644 --- a/lib/add_item.dart +++ b/lib/add_item.dart @@ -4,7 +4,6 @@ import 'package:spritverbrauch/item_list_model.dart'; import 'package:spritverbrauch/sqlite_service.dart'; import 'package:intl/intl.dart'; //for date format -import 'package:intl/date_symbol_data_local.dart'; class AddItem extends StatefulWidget { const AddItem({super.key}); diff --git a/lib/list_item.dart b/lib/list_item.dart index f952bfa..e3720c9 100644 --- a/lib/list_item.dart +++ b/lib/list_item.dart @@ -53,8 +53,9 @@ class _ListItemState extends State { var pricePerLiter = formatter.format(widget.item.pricePerLiter); return DefaultTextStyle( - style: const TextStyle(fontSize: 16), - child: GestureDetector( + style: TextStyle( + fontSize: 16, color: Theme.of(context).colorScheme.onBackground), + child: InkWell( onLongPress: () { showDialog( context: context, @@ -87,80 +88,80 @@ class _ListItemState extends State { ); }, child: Padding( - padding: const EdgeInsets.only(left: 5, right: 5), - child: Column( - children: [ - const Divider(), - Padding( - padding: const EdgeInsets.only(top: 4, bottom: 4), - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: 7, bottom: 7), - child: Row( - children: [ - Expanded( - child: Row( + padding: const EdgeInsets.only(left: 5, right: 5), + child: Column( + children: [ + const Divider(), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only(top: 7, bottom: 7), + child: Row( + children: [ + Expanded( + child: Row( + children: [ + const Icon(Icons.date_range_outlined), + const SizedBox(width: 2), + Text("$day.$month.$year"), + ], + )), + Expanded( + child: Center( + child: Row( + mainAxisSize: MainAxisSize.min, children: [ - const Icon(Icons.date_range_outlined), + const CompoundIcon( + firstIcon: Icons.local_gas_station_outlined, + secondIcon: Icons.route_outlined, + ), const SizedBox(width: 2), - Text("$day.$month.$year"), + Text("$litersPerKilometer l/km"), ], - )), - Expanded( - child: Center( - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const CompoundIcon( - firstIcon: Icons.local_gas_station_outlined, - secondIcon: Icons.route_outlined, - ), - const SizedBox(width: 2), - Text("$litersPerKilometer l/km"), - ], - ), - )), - Expanded( - child: Align( - alignment: Alignment.centerRight, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.euro_outlined), - const SizedBox(width: 2), - Text("$price €"), - ], - ), - )), - ], - ), - ), - Padding( - padding: const EdgeInsets.only(top: 7, bottom: 7), - child: Row( - children: [ - Expanded( - child: Row( + ), + )), + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: Row( + mainAxisSize: MainAxisSize.min, children: [ - const Icon(Icons.route_outlined), + const Icon(Icons.euro_outlined), const SizedBox(width: 2), - Text("$distance km"), + Text("$price €"), ], - )), - Expanded( - child: Center( + ), + )), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(top: 7, bottom: 7), + child: Row( + children: [ + Expanded( child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.local_gas_station_outlined), - const SizedBox(width: 2), - Text("$fuel l"), - ], - ), - )), - Expanded( - child: Align( + children: [ + const Icon(Icons.route_outlined), + const SizedBox(width: 2), + Text("$distance km"), + ], + )), + Expanded( + child: Center( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.local_gas_station_outlined), + const SizedBox(width: 2), + Text("$fuel l"), + ], + ), + )), + Expanded( + child: Align( alignment: Alignment.centerRight, child: Row( mainAxisSize: MainAxisSize.min, @@ -174,15 +175,17 @@ class _ListItemState extends State { Text("$pricePerLiter €"), ], ), - )), - ], - ), + ), + ), + ], ), - ], - ), + ), + ], ), - ], - )), + ), + ], + ), + ), ), ); } diff --git a/pubspec.yaml b/pubspec.yaml index a7b9caa..89b7927 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 +version: 1.0.2+1 environment: sdk: '>=3.3.0 <4.0.0'