BASE: Initialize Localization.

This commit is contained in:
2025-12-03 18:21:19 +05:00
parent cf58d069ab
commit b04050384d
141 changed files with 1577 additions and 1419 deletions

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/widget/place_picker/selected_location_model.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:geolocator/geolocator.dart';
import 'package:get/get_utils/src/extensions/internacionalization.dart';
import 'package:map_launcher/map_launcher.dart';
@@ -64,42 +65,42 @@ class Utils {
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.google, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("Google map is not installed".tr);
ShowToastDialog.showToast("Google map is not installed".tr());
}
} else if (Constant.mapType == "googleGo") {
bool? isAvailable = await MapLauncher.isMapAvailable(MapType.googleGo);
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.googleGo, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("Google Go map is not installed".tr);
ShowToastDialog.showToast("Google Go map is not installed".tr());
}
} else if (Constant.mapType == "waze") {
bool? isAvailable = await MapLauncher.isMapAvailable(MapType.waze);
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.waze, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("Waze is not installed".tr);
ShowToastDialog.showToast("Waze is not installed".tr());
}
} else if (Constant.mapType == "mapswithme") {
bool? isAvailable = await MapLauncher.isMapAvailable(MapType.mapswithme);
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.mapswithme, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("Mapswithme is not installed".tr);
ShowToastDialog.showToast("Mapswithme is not installed".tr());
}
} else if (Constant.mapType == "yandexNavi") {
bool? isAvailable = await MapLauncher.isMapAvailable(MapType.yandexNavi);
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.yandexNavi, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("YandexNavi is not installed".tr);
ShowToastDialog.showToast("YandexNavi is not installed".tr());
}
} else if (Constant.mapType == "yandexMaps") {
bool? isAvailable = await MapLauncher.isMapAvailable(MapType.yandexMaps);
if (isAvailable == true) {
await MapLauncher.showDirections(mapType: MapType.yandexMaps, directionsMode: DirectionsMode.driving, destinationTitle: name, destination: Coords(latitude, longLatitude));
} else {
ShowToastDialog.showToast("yandexMaps map is not installed".tr);
ShowToastDialog.showToast("yandexMaps map is not installed".tr());
}
}
}