input komma and point by liters and pricePerLiter, IPhone problem
This commit is contained in:
@@ -187,13 +187,14 @@ class EditController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void _calculateTotal() {
|
void _calculateTotal() {
|
||||||
final liters = double.tryParse(litersController.text) ?? 0.0;
|
final liters =
|
||||||
final pricePerLiter = double.tryParse(pricePerLiterController.text) ?? 0.0;
|
double.tryParse(litersController.text.replaceAll(',', '.')) ?? 0.0;
|
||||||
|
final pricePerLiter =
|
||||||
|
double.tryParse(pricePerLiterController.text.replaceAll(',', '.')) ??
|
||||||
|
0.0;
|
||||||
calculatedTotal.value = (liters * pricePerLiter).toStringAsFixed(2);
|
calculatedTotal.value = (liters * pricePerLiter).toStringAsFixed(2);
|
||||||
|
print('$liters L * $pricePerLiter €/L = ${calculatedTotal.value} €');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> selectDate(BuildContext context) async {
|
Future<void> selectDate(BuildContext context) async {
|
||||||
@@ -245,8 +246,8 @@ class EditController extends GetxController {
|
|||||||
'userId': userId,
|
'userId': userId,
|
||||||
'date': dateController.text,
|
'date': dateController.text,
|
||||||
'odometer': odometerController.text,
|
'odometer': odometerController.text,
|
||||||
'liters': litersController.text,
|
'liters': litersController.text.replaceAll(',', '.'),
|
||||||
'pricePerLiter': pricePerLiterController.text,
|
'pricePerLiter': pricePerLiterController.text.replaceAll(',', '.'),
|
||||||
'location': locationController.text,
|
'location': locationController.text,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -124,9 +124,7 @@ class EditPage extends GetView<EditController> {
|
|||||||
label: 'Liter',
|
label: 'Liter',
|
||||||
icon: Icons.local_gas_station,
|
icon: Icons.local_gas_station,
|
||||||
controller: editCtrl.litersController,
|
controller: editCtrl.litersController,
|
||||||
keyboardType: TextInputType.numberWithOptions(
|
keyboardType: TextInputType.emailAddress,
|
||||||
decimal: true,
|
|
||||||
),
|
|
||||||
suffix: 'L',
|
suffix: 'L',
|
||||||
required: true,
|
required: true,
|
||||||
),
|
),
|
||||||
@@ -138,9 +136,7 @@ class EditPage extends GetView<EditController> {
|
|||||||
label: 'Preis pro Liter',
|
label: 'Preis pro Liter',
|
||||||
icon: Icons.euro,
|
icon: Icons.euro,
|
||||||
controller: editCtrl.pricePerLiterController,
|
controller: editCtrl.pricePerLiterController,
|
||||||
keyboardType: TextInputType.numberWithOptions(
|
keyboardType: TextInputType.emailAddress,
|
||||||
decimal: true,
|
|
||||||
),
|
|
||||||
suffix: '€/L',
|
suffix: '€/L',
|
||||||
required: true,
|
required: true,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"3452d735bd38224ef2db85ca763d862d6326b1
|
|||||||
|
|
||||||
_flutter.loader.load({
|
_flutter.loader.load({
|
||||||
serviceWorkerSettings: {
|
serviceWorkerSettings: {
|
||||||
serviceWorkerVersion: "220619559" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
serviceWorkerVersion: "138245282" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ FROM nginx:alpine
|
|||||||
# Remove default nginx website
|
# Remove default nginx website
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
|
|
||||||
# Copy the built Flutter web app
|
# Copy the built Flutter web app (exclude installDocker folder)
|
||||||
COPY ../. /usr/share/nginx/html/
|
COPY . /usr/share/nginx/html/
|
||||||
|
RUN rm -rf /usr/share/nginx/html/installDocker
|
||||||
|
|
||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY installDocker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# Expose port 80 (internally, mapped to 8888 externally)
|
# Expose port 80 (internally, mapped to 8888 externally)
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ if [ "$(docker images -q $IMAGE_NAME)" ]; then
|
|||||||
docker rmi $IMAGE_NAME || true
|
docker rmi $IMAGE_NAME || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build new Docker image
|
# Build new Docker image (from parent directory to include web files)
|
||||||
echo "🔨 Building Docker image..."
|
echo "🔨 Building Docker image..."
|
||||||
docker build -t $IMAGE_NAME .
|
cd ..
|
||||||
|
docker build -f installDocker/Dockerfile -t $IMAGE_NAME .
|
||||||
|
cd installDocker
|
||||||
|
|
||||||
# Run container
|
# Run container
|
||||||
echo "🚀 Starting container on port $PORT..."
|
echo "🚀 Starting container on port $PORT..."
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user