|
|
|
@ -46,6 +46,15 @@ class _ProviderProfileViewState extends State<ProviderProfileView> {
|
|
|
|
body: Center(child: CircularProgressIndicator()),
|
|
|
|
body: Center(child: CircularProgressIndicator()),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String providerBannerImageUrl = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (appointmentsVM.providerProfileModel!.serviceProviderBranch!.isNotEmpty) {
|
|
|
|
|
|
|
|
if (appointmentsVM.providerProfileModel!.serviceProviderBranch!.first.branchImages!.isNotEmpty) {
|
|
|
|
|
|
|
|
providerBannerImageUrl = appointmentsVM.providerProfileModel!.serviceProviderBranch!.first.branchImages!.first.imageUrl ?? "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
appBar: CustomAppBar(
|
|
|
|
appBar: CustomAppBar(
|
|
|
|
title: LocaleKeys.providerDetails.tr(),
|
|
|
|
title: LocaleKeys.providerDetails.tr(),
|
|
|
|
@ -59,6 +68,7 @@ class _ProviderProfileViewState extends State<ProviderProfileView> {
|
|
|
|
bool status = await appointmentsVM.removeProviderFromFavorite(serviceProviderID: appointmentsVM.providerProfileModel!.id!, context: context);
|
|
|
|
bool status = await appointmentsVM.removeProviderFromFavorite(serviceProviderID: appointmentsVM.providerProfileModel!.id!, context: context);
|
|
|
|
if (status) {
|
|
|
|
if (status) {
|
|
|
|
appointmentsVM.providerProfileModel!.isFavorite = false;
|
|
|
|
appointmentsVM.providerProfileModel!.isFavorite = false;
|
|
|
|
|
|
|
|
appointmentsVM.getMyFavoriteProviders();
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
@ -76,29 +86,39 @@ class _ProviderProfileViewState extends State<ProviderProfileView> {
|
|
|
|
body: Container(
|
|
|
|
body: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
padding: EdgeInsets.all(21),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 21),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
//TODO: company logo/banner not added form provider app yet
|
|
|
|
Center(child: providerBannerImageUrl.buildNetworkImage(height: 250, width: double.infinity, fit: BoxFit.cover)),
|
|
|
|
Image.asset(MyAssets.bnCar),
|
|
|
|
|
|
|
|
12.height,
|
|
|
|
12.height,
|
|
|
|
(appointmentsVM.providerProfileModel!.name ?? appointmentsVM.providerProfileModel!.companyName).toString().toText(
|
|
|
|
if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
("${LocaleKeys.companyName.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12),
|
|
|
|
|
|
|
|
4.width,
|
|
|
|
|
|
|
|
(appointmentsVM.providerProfileModel!.companyName ?? appointmentsVM.providerProfileModel!.name).toString().toText(
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
isBold: true,
|
|
|
|
isBold: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[
|
|
|
|
if (appointmentsVM.providerProfileModel!.memberSince!.isNotEmpty) ...[
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
("${LocaleKeys.memberSince.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12),
|
|
|
|
("${LocaleKeys.memberSince.tr()}:").toText(color: MyColors.lightTextColor, fontSize: 12),
|
|
|
|
4.width,
|
|
|
|
4.width,
|
|
|
|
"${DateHelper.formatAsMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT(
|
|
|
|
"${DateHelper.formatAsMonthYear(
|
|
|
|
|
|
|
|
DateHelper.parseStringToDate(
|
|
|
|
|
|
|
|
DateHelper.formatDateT(
|
|
|
|
appointmentsVM.providerProfileModel!.memberSince ?? "",
|
|
|
|
appointmentsVM.providerProfileModel!.memberSince ?? "",
|
|
|
|
)))}"
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)}"
|
|
|
|
.toText(fontSize: 12, isBold: true),
|
|
|
|
.toText(fontSize: 12, isBold: true),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -124,7 +144,7 @@ class _ProviderProfileViewState extends State<ProviderProfileView> {
|
|
|
|
onCardTapped: () {
|
|
|
|
onCardTapped: () {
|
|
|
|
navigateWithName(context, AppRoutes.branchDetailView, arguments: branchModel);
|
|
|
|
navigateWithName(context, AppRoutes.branchDetailView, arguments: branchModel);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
providerImageUrl: MyAssets.bnCar,
|
|
|
|
providerImageUrl: (branchModel.branchImages != null && branchModel.branchImages!.isNotEmpty) ? (branchModel.branchImages!.first.imageUrl ?? "") : "",
|
|
|
|
title: branchModel.branchName ?? "",
|
|
|
|
title: branchModel.branchName ?? "",
|
|
|
|
providerLocation: branchModel.distanceKm.toString() + " KM",
|
|
|
|
providerLocation: branchModel.distanceKm.toString() + " KM",
|
|
|
|
providerName: branchModel.serviceProviderName ?? "",
|
|
|
|
providerName: branchModel.serviceProviderName ?? "",
|
|
|
|
|