BASE: Update Icons & Name Of The App.

This commit is contained in:
2025-12-04 10:23:59 +05:00
parent b04050384d
commit e602782edd
228 changed files with 34364 additions and 7905 deletions

View File

@@ -1,5 +1,5 @@
import 'package:customer/widget/place_picker/selected_location_model.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:geolocator/geolocator.dart';
import 'package:geocoding/geocoding.dart';
@@ -34,11 +34,15 @@ class LocationController extends GetxController {
Future<void> getCurrentLocation() async {
try {
Position position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.high,
);
selectedLocation.value = LatLng(position.latitude, position.longitude);
if (mapController != null) {
mapController!.animateCamera(CameraUpdate.newLatLngZoom(selectedLocation.value!, 15));
mapController!.animateCamera(
CameraUpdate.newLatLngZoom(selectedLocation.value!, 15),
);
}
await getAddressFromLatLng(selectedLocation.value!);
@@ -49,11 +53,15 @@ class LocationController extends GetxController {
Future<void> getAddressFromLatLng(LatLng latLng) async {
try {
List<Placemark> placemarks = await placemarkFromCoordinates(latLng.latitude, latLng.longitude);
List<Placemark> placemarks = await placemarkFromCoordinates(
latLng.latitude,
latLng.longitude,
);
if (placemarks.isNotEmpty) {
Placemark place = placemarks.first;
selectedPlaceAddress.value = place;
address.value = "${place.street}, ${place.locality}, ${place.administrativeArea}, ${place.country}";
address.value =
"${place.street}, ${place.locality}, ${place.administrativeArea}, ${place.country}";
} else {
address.value = "Address not found";
}
@@ -71,7 +79,10 @@ class LocationController extends GetxController {
try {
List<Location> locations = await locationFromAddress(zipCode);
if (locations.isNotEmpty) {
selectedLocation.value = LatLng(locations.first.latitude, locations.first.longitude);
selectedLocation.value = LatLng(
locations.first.latitude,
locations.first.longitude,
);
}
} catch (e) {
print("Error getting coordinates for ZIP code: $e");
@@ -80,7 +91,10 @@ class LocationController extends GetxController {
void confirmLocation() {
if (selectedLocation.value != null) {
SelectedLocationModel selectedLocationModel = SelectedLocationModel(address: selectedPlaceAddress.value, latLng: selectedLocation.value);
SelectedLocationModel selectedLocationModel = SelectedLocationModel(
address: selectedPlaceAddress.value,
latLng: selectedLocation.value,
);
Get.back(result: selectedLocationModel);
}
}