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,4 +1,5 @@
// Flutter Packages
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -10,7 +11,7 @@ class EmptyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Text('Nothing found here...'.tr),
child: Text('Nothing found here...'.tr()),
);
}
}

View File

@@ -3,6 +3,7 @@ import 'dart:developer';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/widget/osm_map/map_controller.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -27,7 +28,7 @@ class MapPickerPage extends StatelessWidget {
// centerTitle: false,
// titleSpacing: 0,
// title: Text(
// "PickUp Location".tr,
// "PickUp Location".tr(),
// textAlign: TextAlign.start,
// style: TextStyle(
// fontFamily: AppThemeData.medium,
@@ -97,7 +98,7 @@ class MapPickerPage extends StatelessWidget {
isDark ? AppThemeData.grey900 : AppThemeData.grey900,
),
decoration: InputDecoration(
hintText: 'Search location...'.tr,
hintText: 'Search location...'.tr(),
hintStyle: TextStyle(
color:
isDark
@@ -156,8 +157,8 @@ class MapPickerPage extends StatelessWidget {
children: [
Text(
controller.pickedPlace.value != null
? "Picked Location:".tr
: "No Location Picked".tr,
? "Picked Location:".tr()
: "No Location Picked".tr(),
style: AppThemeData.boldTextStyle(
color: AppThemeData.grey900,
fontSize: 17.sp,
@@ -177,7 +178,7 @@ class MapPickerPage extends StatelessWidget {
children: [
Expanded(
child: RoundedButtonFill(
title: "Confirm Location".tr,
title: "Confirm Location".tr(),
color: AppThemeData.mainColor,
textColor: AppThemeData.grey50,
borderRadius: 12,

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart';
@@ -23,7 +24,7 @@ class PermissionDialog extends StatelessWidget {
Icon(Icons.add_location_alt_rounded, color: Theme.of(context).primaryColor, size: 100),
const SizedBox(height: 20),
Text(
'You denied location permission forever. Please allow location permission from your app settings and receive more accurate delivery.'.tr,
'You denied location permission forever. Please allow location permission from your app settings and receive more accurate delivery.'.tr(),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18),
),
@@ -36,14 +37,14 @@ class PermissionDialog extends StatelessWidget {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30), side: BorderSide(width: 2, color: Theme.of(context).primaryColor)),
minimumSize: const Size(1, 50),
),
child: Text('close'.tr),
child: Text('close'.tr()),
onPressed: () => Navigator.pop(context),
),
),
const SizedBox(width: 10),
Expanded(
child: RoundedButtonFill(
title: "Settings".tr,
title: "Settings".tr(),
color: AppThemeData.grey900,
textColor: AppThemeData.grey50,
onPress: () async {

View File

@@ -4,6 +4,7 @@ import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/widget/place_picker/location_controller.dart';
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/theme_controller.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_google_places_hoc081098/flutter_google_places_hoc081098.dart';
import 'package:flutter_google_places_hoc081098/google_maps_webservice_places.dart';
@@ -130,7 +131,7 @@ class LocationPickerScreen extends StatelessWidget {
children: [
Icon(Icons.search),
SizedBox(width: 8),
Text("Search place...".tr),
Text("Search place...".tr()),
],
),
),

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:get/get_utils/src/extensions/internacionalization.dart';
@@ -194,7 +195,7 @@ class StoryImageState extends State<StoryImage> {
return Center(
child: widget.errorWidget ??
Text(
"Image failed to load.".tr,
"Image failed to load.".tr(),
style: TextStyle(
color: Colors.white,
),