diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 8b4c75e..057bc66 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -738,7 +738,6 @@ "blockedByAdmin": "Blocked by admin", "active": "Active", "paymentType": "Payment Type", - "searchByCreatedDate": "Search By Created Date", "dealCompleted": "The Deal Completed", "theDealNotCompleted": "The Deal Not Completed", "cancelRequest": "I want to cancel the request.", @@ -759,7 +758,7 @@ "tapToSeeItems": "Tap to see items", "noteCopyItemsExplanation": "Note: You will be able to copy items from one service to another in a selected category. You must create the services first and they should be approved. Then you will be able to get the available services from which you can copy all or selected items.", "requestCreatedOn": "Request created on", - "online": "Online" + "online": "Online", "searchByCreatedDate": "Search By Created Date", "updateUserDetails": "Update User Details", "enterNewFirstName": "Enter First Name", @@ -771,7 +770,7 @@ "userGender": "Gender", "userMale": "Male", "userFemale": "Female", - "maxFileSelection" :"You can select a maximum of 7 files", + "maxFileSelection": "You can select a maximum of 7 files", "maxFileSize": "Each file size must be less than 2 MB", "onlyJPGandPNG": "Only JPG and PNG files are allowed", "expiryDate": "Expiry Date" diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index f34a0c9..3ca87cb 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -260,8 +260,8 @@ class GlobalConsts { // Attachment Values - int maxFileCount = 7; - int maxFileSizeInBytes = 2 * 1024 * 1024; + static int maxFileCount = 7; + static int maxFileSizeInBytes = 2 * 1024 * 1024; } class MyAssets { diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 002a71f..bdf7219 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -1533,22 +1533,6 @@ static const Map en_US = { "blockedByAdmin": "Blocked by admin", "active": "Active", "paymentType": "Payment Type", - "searchByCreatedDate": "Search By Created Date", - "updateUserDetails": "Update User Details", - "enterNewFirstName": "Enter First Name", - "enterNewLastName": "Enter Last Name", - "userDetailsUpdated": "User Details is Updated", - "cityNameMandatory": "City is mandatory", - "genderMandatory": "Gender is mandatory", - "updateCity": "Update City", - "userGender": "Gender", - "userMale": "Male", - "userFemale": "Female", - "maxFileSelection": "You can select a maximum of 7 files", - "maxFileSize": "Each file size must be less than 2 MB", - "onlyJPGandPNG": "Only JPG and PNG files are allowed", - "expiryDate": "Expiry Date" - "searchByCreatedDate": "Search By Created Date", "dealCompleted": "The Deal Completed", "theDealNotCompleted": "The Deal Not Completed", "cancelRequest": "I want to cancel the request.", @@ -1569,7 +1553,22 @@ static const Map en_US = { "tapToSeeItems": "Tap to see items", "noteCopyItemsExplanation": "Note: You will be able to copy items from one service to another in a selected category. You must create the services first and they should be approved. Then you will be able to get the available services from which you can copy all or selected items.", "requestCreatedOn": "Request created on", - "online": "Online" + "online": "Online", + "searchByCreatedDate": "Search By Created Date", + "updateUserDetails": "Update User Details", + "enterNewFirstName": "Enter First Name", + "enterNewLastName": "Enter Last Name", + "userDetailsUpdated": "User Details is Updated", + "cityNameMandatory": "City is mandatory", + "genderMandatory": "Gender is mandatory", + "updateCity": "Update City", + "userGender": "Gender", + "userMale": "Male", + "userFemale": "Female", + "maxFileSelection": "You can select a maximum of 7 files", + "maxFileSize": "Each file size must be less than 2 MB", + "onlyJPGandPNG": "Only JPG and PNG files are allowed", + "expiryDate": "Expiry Date" }; static const Map> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; } diff --git a/lib/view_models/ad_view_model.dart b/lib/view_models/ad_view_model.dart index da64be3..0dbfee6 100644 --- a/lib/view_models/ad_view_model.dart +++ b/lib/view_models/ad_view_model.dart @@ -1264,8 +1264,8 @@ class AdVM extends BaseVM { pickedPostingImages.addAll(imageModels); // Added By Aamir - if (pickedPostingImages.length > GlobalConsts().maxFileCount) { - pickedPostingImages = pickedPostingImages.sublist(0, GlobalConsts().maxFileCount); + if (pickedPostingImages.length > GlobalConsts.maxFileCount) { + pickedPostingImages = pickedPostingImages.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } @@ -1312,8 +1312,8 @@ class AdVM extends BaseVM { } else { vehicleDamageCards[index].partImages!.addAll(imageModels); // Added By Aamir - if (vehicleDamageCards[index].partImages!.length > GlobalConsts().maxFileCount) { - vehicleDamageCards[index].partImages = vehicleDamageCards[index].partImages!.sublist(0, GlobalConsts().maxFileCount); + if (vehicleDamageCards[index].partImages!.length > GlobalConsts.maxFileCount) { + vehicleDamageCards[index].partImages = vehicleDamageCards[index].partImages!.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } } @@ -1368,8 +1368,8 @@ class AdVM extends BaseVM { List images = await commonServices.pickMultipleImages(); pickedDamageImages.addAll(images); - if (pickedDamageImages.length > GlobalConsts().maxFileCount) { - pickedDamageImages = pickedDamageImages.sublist(0, GlobalConsts().maxFileCount); + if (pickedDamageImages.length > GlobalConsts.maxFileCount) { + pickedDamageImages = pickedDamageImages.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } if (pickedDamageImages.isNotEmpty) vehicleDamageImageError = ""; diff --git a/lib/view_models/chat_view_model.dart b/lib/view_models/chat_view_model.dart index 763b0d3..c9751f3 100644 --- a/lib/view_models/chat_view_model.dart +++ b/lib/view_models/chat_view_model.dart @@ -443,8 +443,8 @@ class ChatVM extends BaseVM { imageModels.add(ImageModel(filePath: element.path, isFromNetwork: false)); } pickedImagesForMessage.addAll(imageModels); - if (pickedImagesForMessage.length > GlobalConsts().maxFileCount) { - pickedImagesForMessage = pickedImagesForMessage.sublist(0, GlobalConsts().maxFileCount); + if (pickedImagesForMessage.length > GlobalConsts.maxFileCount) { + pickedImagesForMessage = pickedImagesForMessage.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } diff --git a/lib/view_models/requests_view_model.dart b/lib/view_models/requests_view_model.dart index 4a6e619..f636661 100644 --- a/lib/view_models/requests_view_model.dart +++ b/lib/view_models/requests_view_model.dart @@ -269,8 +269,8 @@ class RequestsVM extends BaseVM { imageModels.add(ImageModel(filePath: element.path, isFromNetwork: false)); } pickedVehicleImages.addAll(imageModels); - if (pickedVehicleImages.length > GlobalConsts().maxFileCount) { - pickedVehicleImages = pickedVehicleImages.sublist(0, GlobalConsts().maxFileCount); + if (pickedVehicleImages.length > GlobalConsts.maxFileCount) { + pickedVehicleImages = pickedVehicleImages.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } diff --git a/lib/view_models/service_view_model.dart b/lib/view_models/service_view_model.dart index 628dc51..59397ea 100644 --- a/lib/view_models/service_view_model.dart +++ b/lib/view_models/service_view_model.dart @@ -140,8 +140,8 @@ class ServiceVM extends BaseVM { imageModels.add(ImageModel(filePath: element.path, isFromNetwork: false)); } pickedBranchImages.addAll(imageModels); - if (pickedBranchImages.length > GlobalConsts().maxFileCount) { - pickedBranchImages = pickedBranchImages.sublist(0, GlobalConsts().maxFileCount); + if (pickedBranchImages.length > GlobalConsts.maxFileCount) { + pickedBranchImages = pickedBranchImages.sublist(0, GlobalConsts.maxFileCount); Utils.showToast(LocaleKeys.maxFileSelection); } if (pickedBranchImages.isNotEmpty) branchImageError = ""; diff --git a/lib/views/user/complete_profile_page.dart b/lib/views/user/complete_profile_page.dart index e78392e..0ce12a0 100644 --- a/lib/views/user/complete_profile_page.dart +++ b/lib/views/user/complete_profile_page.dart @@ -46,7 +46,6 @@ class _CompleteProfilePageState extends State { @override Widget build(BuildContext context) { return Consumer(builder: (BuildContext context, UserVM userVM, Widget? child) { - print("Country ID = " + AppState().getUserRegisterCountrySelection.id.toString()); userVM.getAllCitiesForUser(AppState().getUserRegisterCountrySelection.id); return Scaffold( appBar: CustomAppBar(