aamir_dev
Aamir 11 months ago
parent c8e1f6d756
commit 671b9d9e6f

@ -708,7 +708,7 @@
"updateUserDetails": "تحديث تفاصيل المستخدم",
"enterNewFirstName": "أدخل الاسم الأول",
"enterNewLastName": "أدخل الاسم الأخير",
"userDetailsUpdated": "يتم تحديث تفاصيل المستخدم"
"userDetailsUpdated": "يتم تحديث تفاصيل المستخدم",
"itemNoLongerAvailable": "لم يعد هذا العنصر متاحًا.",
"reactivateAd": "إعادة تنشيط الإعلان",
"dealOutsideApp": "تمت الصفقة خارج التطبيق مع عميل آخر.",

@ -738,8 +738,7 @@
"blockedByAdmin": "Blocked by admin",
"active": "Active",
"paymentType": "Payment Type",
"searchByCreatedDate": "Search By Created Date"
"itemNoLongerAvailable": "This item is no longer available.",
"searchByCreatedDate": "Search By Created Date",
"updateUserDetails": "Update User Details",
"enterNewFirstName": "Enter First Name",
"enterNewLastName": "Enter Last Name",

@ -39,6 +39,7 @@ class ApiConsts {
static String logoutUser = "${baseUrlServices}api/Account/Logout";
static String updateUserImage = "${baseUrlServices}api/User_UpdateProfileImage";
static String getUserImage = "${baseUrlServices}api/ProfileImage";
static String userUpdate = "${baseUrlServices}api/User_Update";
static String providerComplaintCreate = "${baseUrlServices}api/ServiceProviders/ProviderComplaint_Create";
//Profile

@ -44,6 +44,7 @@ import 'package:mc_common_app/views/user/register_page.dart';
import 'package:mc_common_app/views/user/register_provider_page.dart';
import 'package:mc_common_app/views/user/register_selection_page.dart';
import 'package:mc_common_app/views/splash/splash_page.dart';
import 'package:mc_common_app/views/user/update_user_city_country.dart';
import 'package:mc_common_app/views/user/update_user_details.dart';
import 'package:mc_common_app/views/user/vertify_password_page.dart';
import 'package:flutter/material.dart';
@ -170,6 +171,7 @@ class AppRoutes {
//Chat
static const String chatView = "/chatView";
static const String updateUserDetails = "/updateUserDetails";
static const String updateUserCity = "/updateUserCity";
static const String initialRoute = splash;
static final Map<String, WidgetBuilder> routes = {
@ -190,6 +192,7 @@ class AppRoutes {
changeMobilePage: (context) => ChangeMobilePage(),
changeEmailPage: (context) => const ChangeEmailPage(),
updateUserDetails: (context) => const UpdateUserDetails(),
updateUserCity: (context) => const UpdateUserCityCountry(),
changePassword: (context) => const ChangePasswordPage(),
editAccountPage: (context) => const EditAccountPage(),
profileView: (context) => const ProfileScreen(),

@ -721,11 +721,11 @@ class CodegenLoader extends AssetLoader{
"customerLocation": "موقع العميل",
"deliveryAvailable": "التوصيل متاح",
"viewed": "تم المشاهدة",
"itemNoLongerAvailable": "لم يعد هذا العنصر متاحًا.",
"updateUserDetails": "تحديث تفاصيل المستخدم",
"enterNewFirstName": "أدخل الاسم الأول",
"enterNewLastName": "أدخل الاسم الأخير",
"userDetailsUpdated": "يتم تحديث تفاصيل المستخدم",
"itemNoLongerAvailable": "لم يعد هذا العنصر متاحًا.",
"reactivateAd": "إعادة تنشيط الإعلان",
"dealOutsideApp": "تمت الصفقة خارج التطبيق مع عميل آخر.",
"noAgreementCustomer": "لا يوجد اتفاق من جانب العميل.",
@ -1390,7 +1390,7 @@ static const Map<String,dynamic> en_US = {
"priceRange": "Price Range",
"cancelOffer": "Cancel Offer",
"pleaseSpecify": "Please Specify",
"customerNotResponding": "Customer Not Responding",
"customerNotResponding": "The customer is not responding.",
"cancelRequestPrompt": "Do you want to cancel this request?",
"requestPermanentlyCancelled": "Your request will be permanently cancelled. You cannot undo this action.",
"awaitingResponseFromCustomer": "Awaiting Response From Customer",
@ -1410,7 +1410,7 @@ static const Map<String,dynamic> en_US = {
"customerCarePrompt": "Got any question? We are here to service. Click here to talk to our customer care right now.",
"callNow": "Call Now",
"condition": "Condition",
"servicesNotAvailableHomeLocation": "Some services are not available on home location.",
"servicesNotAvailableHomeLocation": "This location will be same for all services",
"additionalChargesNotice": "These charges are additional to the actual service charges. For heavy items the charges may vary.",
"selectServiceLocation": "Select Service Location",
"apptOn": "Appt On",
@ -1467,10 +1467,6 @@ static const Map<String,dynamic> en_US = {
"deliveryAvailable": "Delivery Available",
"viewed": "Viewed",
"itemNoLongerAvailable": "This item is no longer available.",
"updateUserDetails": "Update User Details",
"enterNewFirstName": "Enter First Name",
"enterNewLastName": "Enter Last Name",
"userDetailsUpdated": "User Details is Updated"
"reactivateAd": "Reactivate Ad",
"dealOutsideApp": "The deal was done outside the app with another customer.",
"noAgreementCustomer": "There is no agreement from the customer side.",
@ -1506,7 +1502,11 @@ static const Map<String,dynamic> en_US = {
"blockedByAdmin": "Blocked by admin",
"active": "Active",
"paymentType": "Payment Type",
"searchByCreatedDate": "Search By Created Date"
"searchByCreatedDate": "Search By Created Date",
"updateUserDetails": "Update User Details",
"enterNewFirstName": "Enter First Name",
"enterNewLastName": "Enter Last Name",
"userDetailsUpdated": "User Details is Updated"
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -25,14 +25,16 @@ class User {
int? messageStatus;
String? message;
factory User.fromJson(Map<String, dynamic> json) => User(
factory User.fromJson(Map<String, dynamic> json) =>
User(
totalItemsCount: json["totalItemsCount"],
data: json["data"] == null ? null : UserData.fromJson(json["data"]),
messageStatus: json["messageStatus"],
message: json["message"],
);
Map<String, dynamic> toJson() => {
Map<String, dynamic> toJson() =>
{
"totalItemsCount": totalItemsCount,
"data": data?.toJson(),
"messageStatus": messageStatus,
@ -53,14 +55,16 @@ class UserData {
DateTime? expiryDate;
UserInfo? userInfo;
factory UserData.fromJson(Map<String, dynamic> json) => UserData(
factory UserData.fromJson(Map<String, dynamic> json) =>
UserData(
accessToken: json["accessToken"],
refreshToken: json["refreshToken"],
expiryDate: json["expiryDate"] == null ? null : DateTime.parse(json["expiryDate"]),
userInfo: json["userInfo"] == null ? null : UserInfo.fromJson(json["userInfo"]),
);
Map<String, dynamic> toJson() => {
Map<String, dynamic> toJson() =>
{
"accessToken": accessToken,
"refreshToken": refreshToken,
"expiryDate": expiryDate?.toIso8601String(),
@ -69,34 +73,38 @@ class UserData {
}
class UserInfo {
UserInfo(
{this.id,
this.userId,
this.firstName,
this.lastName,
this.mobileNo,
this.email,
this.userImageUrl,
this.roleId,
this.roleName,
this.isEmailVerified,
this.serviceProviderBranch,
this.isVerified,
this.userRoles,
this.isCustomer,
this.isProviderDealership,
this.isDealershipUser,
this.providerId,
this.customerId,
this.countryId,
this.cityId,
this.dealershipId,
this.userLocalImage});
UserInfo({this.id,
this.userId,
this.firstName,
this.lastName,
this.mobileNo,
this.email,
this.userImageUrl,
this.roleId,
this.roleName,
this.isEmailVerified,
this.serviceProviderBranch,
this.isVerified,
this.userRoles,
this.isCustomer,
this.isProviderDealership,
this.isDealershipUser,
this.providerId,
this.customerId,
this.countryId,
this.cityId,
this.dealershipId,
this.userLocalImage,
this.cityName,
this.countryName,
});
int? id;
String? userId;
String? firstName;
String? lastName;
String? countryName;
String? cityName;
String? mobileNo;
String? email;
dynamic userImageUrl;
@ -130,6 +138,8 @@ class UserInfo {
userId = json["userID"];
firstName = json["firstName"];
lastName = json["lastName"];
cityName = json["cityName"];
countryName = json["countryName"];
mobileNo = json["mobileNo"];
email = json["email"];
userImageUrl = json["userImageUrl"];
@ -172,11 +182,14 @@ class UserInfo {
// dealershipId: json["dealershipID"],
// );
Map<String, dynamic> toJson() => {
Map<String, dynamic> toJson() =>
{
"id": id,
"userID": userId,
"firstName": firstName,
"lastName": lastName,
"countryName": countryName,
"cityName": cityName,
"mobileNo": mobileNo,
"email": email,
"userImageUrl": userImageUrl,

@ -55,7 +55,7 @@ abstract class UserRepo {
Future<GenericRespModel> changePassword(String currentPassword, String newPassword);
Future<Map<String, dynamic>> updateUserInfo(String firstName, String lastName);
Future<Map<String, dynamic>> updateUserInfo(String firstName, String lastName, String? city);
Future<ChangeMobileRespModel> changeMobileNoOTPRequest(countryID, String mobileNo, String password);
@ -166,6 +166,11 @@ class UserRepoImp implements UserRepo {
return await injector.get<ApiClient>().getJsonForObject((json) => Country.fromJson(json), ApiConsts.getAllCountry);
}
// @override
// Future<Country> getAllCountriesForUser() async {
// return await injector.get<ApiClient>().getJsonForObject((json) => Country.fromJson(json), ApiConsts.getAllCountry);
// }
@override
Future<Cities> getAllCites(String countryId) async {
var postParams = {
@ -257,8 +262,8 @@ class UserRepoImp implements UserRepo {
}
@override
Future<Map<String, dynamic>> updateUserInfo(String firstName, String lastName) async {
var postParams = {"userID": "${AppState().getUser.data!.userInfo!.userId}", "firstName": "${firstName}", "lastName": "${lastName}", "genderID": 1, "cityID": 1};
Future<Map<String, dynamic>> updateUserInfo(String firstName, String lastName, String? city) async {
var postParams = {"userID": "${AppState().getUser.data!.userInfo!.userId}", "firstName": "${firstName}", "lastName": "${lastName}", "genderID": 1, "cityID": city ?? 1};
String t = AppState().getUser.data!.accessToken ?? "";
return await injector.get<ApiClient>().postJsonForObject((json) => json, ApiConsts.userUpdate, postParams, token: t);
}

@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:developer';
import 'package:mc_common_app/classes/app_state.dart';
@ -189,7 +190,9 @@ class SubscriptionsVM extends BaseVM {
mySubscriptionsBySp.clear();
setState(ViewState.busy);
// allSubscriptions.data
print("====================== SUB =============");
for (var element in allSubscriptions.data!) {
print("SuBBB "+ element.subscriptionType.toString());
if (element.subscriptionTypeEnum == SubscriptionTypeEnum.current) {
mySubscriptionsBySp.add(element);
}

@ -18,6 +18,7 @@ import 'package:mc_common_app/models/subscriptions_models/subscription_model.dar
import 'package:mc_common_app/models/user_models/basic_otp.dart';
import 'package:mc_common_app/models/user_models/change_email.dart';
import 'package:mc_common_app/models/user_models/change_mobile.dart';
import 'package:mc_common_app/models/user_models/cities.dart';
import 'package:mc_common_app/models/user_models/confirm_email.dart';
import 'package:mc_common_app/models/user_models/confirm_mobile.dart';
import 'package:mc_common_app/models/user_models/confirm_password.dart';
@ -63,6 +64,9 @@ class UserVM extends BaseVM {
_loginOtherAccount = value;
}
Country? userCountries;
Cities? userCities;
void updateCompleteProfilePageCheckbox(bool newValue) {
completeProfilePageCheckbox = newValue;
notifyListeners();
@ -165,15 +169,17 @@ class UserVM extends BaseVM {
}
}
Future<void> userDetailsUpdate(BuildContext context, String firstName, String lastName) async {
Future<void> userDetailsUpdate(BuildContext context, String firstName, String lastName, String? city) async {
Utils.showLoading(context);
Map<String, dynamic> res = await userRepo.updateUserInfo(firstName, lastName);
Map<String, dynamic> res = await userRepo.updateUserInfo(firstName, lastName, city);
Utils.hideLoading(context);
if (res["data"] != null && res["data"].isNotEmpty) {
print(res["data"]);
User localUser = AppState().getUser;
if (localUser.data != null) {
localUser.data!.userInfo!.firstName = res["data"]["firstName"];
localUser.data!.userInfo!.lastName = res["data"]["lastName"];
// localUser.data!.userInfo!.cityId = res["data"]["cityId"];
AppState().setUser = localUser;
}
Utils.showToast(LocaleKeys.userDetailsUpdated.tr());
@ -572,6 +578,16 @@ class UserVM extends BaseVM {
return await userRepo.getAllCountries();
}
Future<void> getAllCountriesForUser() async {
userCountries = await userRepo.getAllCountries();
notifyListeners();
}
Future<void> getAllCitiesForUser(int countryId) async {
userCities = await userRepo.getAllCites(countryId.toString());
notifyListeners();
}
Future<void> performBasicOtpRegisterPage(BuildContext context,
{required String countryCode, required String phoneNum, required int role, bool isNeedToPassToken = false, VoidCallback? reloadPage}) async {
Utils.showLoading(context);

@ -72,21 +72,21 @@ class _ProfileScreenState extends State<ProfileScreen> {
decoration: BoxDecoration(
image: AppState().getUser.data!.userInfo!.userLocalImage != null
? DecorationImage(
image: FileImage(AppState().getUser.data!.userInfo!.userLocalImage!),
fit: BoxFit.cover,
)
image: FileImage(AppState().getUser.data!.userInfo!.userLocalImage!),
fit: BoxFit.cover,
)
: AppState().getUser.data!.userInfo!.userImageUrl != null
? DecorationImage(
image: CachedNetworkImageProvider(
AppState().getUser.data!.userInfo!.userImageUrl,
),
fit: BoxFit.cover,
)
: DecorationImage(
image: AssetImage(
MyAssets.icLogoWhitePng,
),
),
? DecorationImage(
image: CachedNetworkImageProvider(
AppState().getUser.data!.userInfo!.userImageUrl,
),
fit: BoxFit.cover,
)
: DecorationImage(
image: AssetImage(
MyAssets.icLogoWhitePng,
),
),
),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 7.0, sigmaY: 7.0),
@ -111,7 +111,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
children: [
"${AppState().getUser.data!.userInfo!.firstName} ${AppState().getUser.data!.userInfo!.lastName ?? ""}".toText(fontSize: 20).paddingOnly(left: 25, right: 10),
MyAssets.icEdit.buildSvg(width: 15).onPress(
() async {
() async {
Navigator.pushNamed(context, AppRoutes.updateUserDetails);
},
),
@ -131,11 +131,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
],
CustomProfileOptionsTile(
titleText: LocaleKeys.country.tr(),
subtitleText: "Saudi Arabia",
titleText: LocaleKeys.city.tr(),
subtitleText: "${AppState().getUser.data!.userInfo!.cityName ?? ""}, ${AppState().getUser.data!.userInfo!.countryName ?? ""}",
needBorderBelow: true,
needEditButton: false,
onTap: () {},
needEditButton: true,
onTap: () {
Navigator.pushNamed(context, AppRoutes.updateUserCity);
},
),
CustomProfileOptionsTile(
titleText: LocaleKeys.email.tr(),
@ -161,11 +163,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
},
),
],
).toContainer(width: double.infinity,
isShadowEnabled: true,
paddingAll: 10,
margin: const EdgeInsets.fromLTRB(24, 20, 24, 0),
borderRadius: 0),
).toContainer(width: double.infinity, isShadowEnabled: true, paddingAll: 10, margin: const EdgeInsets.fromLTRB(24, 20, 24, 0), borderRadius: 0),
],
),
),
@ -173,83 +171,69 @@ class _ProfileScreenState extends State<ProfileScreen> {
],
),
Positioned(
top: MediaQuery
.of(context)
.size
.height * 0.24,
top: MediaQuery.of(context).size.height * 0.24,
child: Container(
height: 100,
alignment: Alignment.centerLeft,
child: ClipOval(
child: AppState().getUser.data!.userInfo!.userLocalImage != null
? Image.file(
AppState().getUser.data!.userInfo!.userLocalImage!,
width: 100,
height: 100,
fit: BoxFit.fill,
)
AppState().getUser.data!.userInfo!.userLocalImage!,
width: 100,
height: 100,
fit: BoxFit.fill,
)
: CachedNetworkImage(
imageUrl: "${AppState().getUser.data!.userInfo!.userImageUrl}",
imageBuilder: (context, imageProvider) =>
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
imageUrl: "${AppState().getUser.data!.userInfo!.userImageUrl}",
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
),
placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) => const Icon(Icons.error),
width: 100,
height: 100,
fit: BoxFit.fill,
fadeInCurve: Curves.easeIn,
fadeInDuration: const Duration(milliseconds: 1000),
useOldImageOnUrlChange: false,
),
placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
errorWidget: (context, url, error) => const Icon(Icons.error),
width: 100,
height: 100,
fit: BoxFit.fill,
fadeInCurve: Curves.easeIn,
fadeInDuration: const Duration(milliseconds: 1000),
useOldImageOnUrlChange: false,
),
),
).horPaddingMain(),
),
Positioned(
top: MediaQuery
.of(context)
.size
.height * 0.30,
right: MediaQuery
.of(context)
.size
.height * 0.03,
top: MediaQuery.of(context).size.height * 0.30,
right: MediaQuery.of(context).size.height * 0.03,
child: Container(
height: 40,
width: 40,
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(color: MyColors.white, shape: BoxShape.circle, border: Border.all(color: MyColors.darkTextColor, width: 0.1)),
child: Center(child: MyAssets.icEdit.buildSvg(),),
child: Center(
child: MyAssets.icEdit.buildSvg(),
),
).onPress(
() async {
() async {
await model.updateUserImage(context);
},
),
),
Positioned(
top: MediaQuery
.of(context)
.size
.height * 0.05,
left: MediaQuery
.of(context)
.size
.height * 0.03,
top: MediaQuery.of(context).size.height * 0.05,
left: MediaQuery.of(context).size.height * 0.03,
child: const Icon(Icons.arrow_back_ios, color: Colors.black, size: 18)
.toContainer(
padding: const EdgeInsets.only(left: 5),
borderRadius: 100,
borderColor: MyColors.lightGreyEFColor,
isEnabledBorder: true,
height: 40,
width: 40,
)
padding: const EdgeInsets.only(left: 5),
borderRadius: 100,
borderColor: MyColors.lightGreyEFColor,
isEnabledBorder: true,
height: 40,
width: 40,
)
.onPress(() => pop(context))),
],
);

@ -41,12 +41,12 @@ class _ChangeEmailPageState extends State<ChangeEmailPage> {
padding: const EdgeInsets.all(20),
child: Column(
children: [
LocaleKeys.enterEmail.tr().toText(
height: 23 / 24,
fontSize: 24,
letterSpacing: -1.44,
),
12.height,
// LocaleKeys.enterEmail.tr().toText(
// height: 23 / 24,
// fontSize: 24,
// letterSpacing: -1.44,
// ),
// 12.height,
TxtField(
hint: LocaleKeys.enterNewEmail.tr(),
onChanged: (v) => email = v,

@ -39,12 +39,12 @@ class _ChangeMobilePageState extends State<ChangeMobilePage> {
padding: const EdgeInsets.all(20),
child: Column(
children: [
LocaleKeys.enterNewPhoneNumber.tr().toText(
height: 23 / 24,
fontSize: 24,
letterSpacing: -1.44,
),
12.height,
// LocaleKeys.enterNewPhoneNumber.tr().toText(
// height: 23 / 24,
// fontSize: 24,
// letterSpacing: -1.44,
// ),
// 12.height,
TxtField(
hint: LocaleKeys.enterNewPhoneNumber.tr(),
onChanged: (v) => mobileNo = v,

@ -39,12 +39,12 @@ class _ChangePasswordPageState extends State<ChangePasswordPage> {
padding: const EdgeInsets.all(20),
child: Column(
children: [
LocaleKeys.enterNewPassword.tr().toText(
height: 23 / 24,
fontSize: 24,
letterSpacing: -1.44,
),
12.height,
// LocaleKeys.enterNewPassword.tr().toText(
// height: 23 / 24,
// fontSize: 24,
// letterSpacing: -1.44,
// ),
// 12.height,
TxtField(
hint: LocaleKeys.enterOldPassword.tr(),
onChanged: (v) => currentPassword = v,

@ -0,0 +1,105 @@
import 'package:mc_common_app/classes/app_state.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/models/general_models/widgets_models.dart';
import 'package:mc_common_app/view_models/ad_view_model.dart';
import 'package:mc_common_app/view_models/user_view_model.dart';
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
import 'package:mc_common_app/widgets/txt_field.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class UpdateUserCityCountry extends StatefulWidget {
const UpdateUserCityCountry({Key? key}) : super(key: key);
@override
State<UpdateUserCityCountry> createState() => _UpdateUserCityCountryState();
}
class _UpdateUserCityCountryState extends State<UpdateUserCityCountry> {
DropValue? city;
DropValue? country;
@override
void initState() {
context.read<UserVM>().getAllCountriesForUser();
super.initState();
}
@override
Widget build(BuildContext context) {
return Consumer(builder: (BuildContext context, UserVM uVM, Widget? child) {
return Scaffold(
appBar: CustomAppBar(
title: "Update City",
),
body: Column(
children: [
uVM.userCountries != null
? Container(
padding: const EdgeInsets.only(right: 20, left: 20, top: 12),
child: Builder(builder: (context) {
List<DropValue> userCountryDrop = [];
for (var element in uVM.userCountries!.data!) {
if (AppState().getUser.data!.userInfo!.countryId == element.id) {
country = DropValue(element.id?.toInt() ?? 0, element.countryName ?? "", "");
}
userCountryDrop.add(DropValue(element.id?.toInt() ?? 0, element.countryName ?? "", ""));
}
return DropdownField(
(DropValue value) async {
country = value;
await uVM.getAllCitiesForUser(country!.id);
setState(() {});
},
list: userCountryDrop,
dropdownValue: country != null && country != -1 ? DropValue(country!.id, country!.value, "") : null,
hint: country != null && country != -1 ? country!.value : "Country",
// errorValue: adVM.vehicleCountryId.errorValue,
);
}))
: SizedBox(),
uVM.userCities != null
? Container(
padding: const EdgeInsets.only(right: 20, left: 20, top: 12),
child: Builder(builder: (context) {
List<DropValue> userCityDrop = [];
for (var element in uVM.userCities!.data!) {
if (AppState().getUser.data!.userInfo!.cityId == element.id) {
city = DropValue(element.id?.toInt() ?? 0, element.cityName ?? "", "");
}
userCityDrop.add(DropValue(element.id?.toInt() ?? 0, element.cityName ?? "", ""));
}
return DropdownField(
(DropValue value) {
city = value;
setState(() {});
},
list: userCityDrop,
dropdownValue: city != null && city != -1 ? DropValue(city!.id, city!.value, "") : null,
hint: city != null && city != -1 ? city!.value : "City",
// errorValue: adVM.vehicleCountryId.errorValue,
);
}))
: SizedBox(),
20.height,
Padding(
padding: const EdgeInsets.all(20.0),
child: ShowFillButton(
title: LocaleKeys.confirm.tr(),
maxWidth: double.infinity,
onPressed: () async {
await uVM.userDetailsUpdate(context, AppState().getUser.data!.userInfo!.firstName!, AppState().getUser.data!.userInfo!.lastName!, city != null ? city?.id.toString() : null);
},
),
),
],
),
);
});
}
}

@ -55,7 +55,7 @@ class _UpdateUserDetailsState extends State<UpdateUserDetails> {
title: LocaleKeys.confirm.tr(),
maxWidth: double.infinity,
onPressed: () async {
await userVM.userDetailsUpdate(context, firstname, lastname);
await userVM.userDetailsUpdate(context, firstname, lastname, null);
},
),

@ -22,7 +22,7 @@ dependencies:
sizer: ^3.0.4
fluttertoast: ^8.0.8
shared_preferences: ^2.0.6
file_picker: ^8.1.2
file_picker: ^8.0.7
image_picker: ^1.1.2
equatable: ^2.0.3
logger: ^2.4.0
@ -34,7 +34,7 @@ dependencies:
badges: ^3.0.2
carousel_slider: 5.0.0
dropdown_button2: ^2.0.0
flutter_inappwebview: ^6.1.5
flutter_inappwebview: ^6.0.0
country_code_picker: ^3.0.0
table_calendar: ^3.0.9
intl: any
@ -47,8 +47,8 @@ dependencies:
# Firebase Packages
firebase_messaging: ^15.1.3
firebase_core: ^3.6.0
firebase_messaging: ^15.0.4
firebase_core: ^3.3.0
flutter_local_notifications: ^18.0.0
@ -62,7 +62,7 @@ dependencies:
# Auth
local_auth: ^2.2.0
# huawei_fido: ^6.3.0+305
device_info_plus: ^11.0.0
device_info_plus: ^10.1.0
dev_dependencies:

Loading…
Cancel
Save