BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/rental_home_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../models/rental_vehicle_type.dart';
|
||||
@@ -71,7 +72,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
Get.offAll(const LoginScreen());
|
||||
},
|
||||
child: Text(
|
||||
"Login".tr(),
|
||||
"Login".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -131,7 +132,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Service is unavailable at the selected address."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -167,7 +168,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Service is unavailable at the selected address."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -178,8 +179,8 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
child: TextFieldWidget(
|
||||
controller:
|
||||
controller.sourceTextEditController.value,
|
||||
hintText: "Your current location".tr(),
|
||||
title: "Pickup Location".tr(),
|
||||
hintText: "Your current location".tr,
|
||||
title: "Pickup Location".tr,
|
||||
enable: false,
|
||||
prefix: Padding(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
@@ -196,7 +197,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Select Your Vehicle Type".tr(),
|
||||
"Select Your Vehicle Type".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -407,20 +408,20 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
onPress: () async {
|
||||
final sourceText =
|
||||
controller.sourceTextEditController.value.text
|
||||
.trim();
|
||||
if (Constant.userModel == null) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please login to continue".tr(),
|
||||
"Please login to continue".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (sourceText.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select source location".tr(),
|
||||
"Please select source location".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -428,7 +429,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
if (controller.selectedVehicleType.value ==
|
||||
null) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a vehicle type".tr(),
|
||||
"Please select a vehicle type".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -438,7 +439,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
if (controller.rentalPackages.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"No preference available for the selected vehicle type"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -502,7 +503,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
"Select Preferences".tr(),
|
||||
"Select Preferences".tr,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
@@ -627,7 +628,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
onPress: () {
|
||||
Get.bottomSheet(
|
||||
paymentBottomSheet(context, controller, isDark),
|
||||
@@ -675,7 +676,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Select Payment Method".tr(),
|
||||
"Select Payment Method".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -699,7 +700,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
controller: scrollController,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr(),
|
||||
"Preferred Payment".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -772,7 +773,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Other Payment Options".tr(),
|
||||
"Other Payment Options".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -923,13 +924,13 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
|
||||
// Continue button
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
if (controller.selectedPaymentMethod.value.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a payment method".tr(),
|
||||
"Please select a payment method".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -948,7 +949,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
|
||||
if (walletAmount < baseFare) {
|
||||
ShowToastDialog.showToast(
|
||||
"You do not have sufficient wallet balance".tr(),
|
||||
"You do not have sufficient wallet balance".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user