BASE: Initialize Localization.
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:customer/utils/utils.dart';
|
||||
import 'package:customer/widget/osm_map/map_picker_page.dart';
|
||||
import 'package:customer/widget/place_picker/location_picker_screen.dart';
|
||||
import 'package:customer/widget/place_picker/selected_location_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -45,15 +46,15 @@ class EnterManuallyLocationScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
controller.mode == "Edit" ? "Edit Address".tr : "Add a New Address".tr,
|
||||
controller.mode == "Edit" ? "Edit Address".tr() : "Add a New Address".tr(),
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text("Enter your location details so we can deliver your orders quickly and accurately.".tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
|
||||
Text("Enter your location details so we can deliver your orders quickly and accurately.".tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
|
||||
const SizedBox(height: 24),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Set as Default Address".tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600))),
|
||||
Expanded(child: Text("Set as Default Address".tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600))),
|
||||
Transform.scale(
|
||||
scale: 0.7, // Decrease the size (try 0.5, 0.6, etc.)
|
||||
child: Switch(
|
||||
@@ -97,8 +98,8 @@ class EnterManuallyLocationScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: TextFieldWidget(
|
||||
title: "Choose Location".tr,
|
||||
hintText: "Choose Location".tr,
|
||||
title: "Choose Location".tr(),
|
||||
hintText: "Choose Location".tr(),
|
||||
readOnly: true,
|
||||
enable: false,
|
||||
controller: null,
|
||||
@@ -137,15 +138,15 @@ class EnterManuallyLocationScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(title: "Flat/House/Floor/Building*".tr, hintText: "Enter address details".tr, controller: controller.houseBuildingTextEditingController.value),
|
||||
TextFieldWidget(title: "Flat/House/Floor/Building*".tr(), hintText: "Enter address details".tr(), controller: controller.houseBuildingTextEditingController.value),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(title: "Area/Sector/Locality*".tr, hintText: "Enter area/locality".tr, controller: controller.localityEditingController.value),
|
||||
TextFieldWidget(title: "Area/Sector/Locality*".tr(), hintText: "Enter area/locality".tr(), controller: controller.localityEditingController.value),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(title: "Nearby Landmark".tr, hintText: "Add a landmark".tr, controller: controller.landmarkEditingController.value),
|
||||
TextFieldWidget(title: "Nearby Landmark".tr(), hintText: "Add a landmark".tr(), controller: controller.landmarkEditingController.value),
|
||||
const SizedBox(height: 30),
|
||||
Container(height: 1, color: AppThemeData.grey200),
|
||||
const SizedBox(height: 25),
|
||||
Text("Save Address As".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
|
||||
Text("Save Address As".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
|
||||
const SizedBox(height: 10),
|
||||
Wrap(
|
||||
spacing: 10,
|
||||
@@ -175,18 +176,18 @@ class EnterManuallyLocationScreen extends StatelessWidget {
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Save Address".tr,
|
||||
title: "Save Address".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
if (controller.location.value.latitude == null || controller.location.value.longitude == null) {
|
||||
ShowToastDialog.showToast("Please select Location".tr);
|
||||
ShowToastDialog.showToast("Please select Location".tr());
|
||||
} else if (controller.houseBuildingTextEditingController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please Enter Flat / House / Floor / Building".tr);
|
||||
ShowToastDialog.showToast("Please Enter Flat / House / Floor / Building".tr());
|
||||
} else if (controller.localityEditingController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please Enter Area / Sector / Locality".tr);
|
||||
ShowToastDialog.showToast("Please Enter Area / Sector / Locality".tr());
|
||||
} else {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
//Common values
|
||||
controller.shippingModel.value.location = controller.location.value;
|
||||
|
||||
Reference in New Issue
Block a user