Skip to content

Commit

Permalink
Merge pull request #1 from RedCommander735/light-mode-fix
Browse files Browse the repository at this point in the history
Light mode fix
  • Loading branch information
RedCommander735 authored Mar 3, 2024
2 parents 83d7db0 + 486835a commit ced8d96
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 79 deletions.
1 change: 0 additions & 1 deletion lib/Overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion lib/add_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down
155 changes: 79 additions & 76 deletions lib/list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ class _ListItemState extends State<ListItem> {
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<void>(
context: context,
Expand Down Expand Up @@ -87,80 +88,80 @@ class _ListItemState extends State<ListItem> {
);
},
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,
Expand All @@ -174,15 +175,17 @@ class _ListItemState extends State<ListItem> {
Text("$pricePerLiter €"),
],
),
)),
],
),
),
),
],
),
],
),
),
],
),
],
)),
),
],
),
),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit ced8d96

Please sign in to comment.