|
|
|
@ -94,53 +94,52 @@ class HomeFragment extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// NEARBY BRANCHES SECTION
|
|
|
|
|
7.height,
|
|
|
|
|
Consumer(
|
|
|
|
|
builder: (BuildContext context, AppointmentsVM appointmentVM, Widget? child) {
|
|
|
|
|
if (appointmentVM.state == ViewState.busy) {
|
|
|
|
|
return Center(child: CircularProgressIndicator());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (appointmentVM.myRecentBranches.isNotEmpty) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
ViewAllWidget(
|
|
|
|
|
title: LocaleKeys.myRecentBranches.tr().toUpperCase(),
|
|
|
|
|
subTitle: '',
|
|
|
|
|
onSubtitleTapped: () {
|
|
|
|
|
// context.read<DashboardVmCustomer>().onNavbarTapped(0);
|
|
|
|
|
// context.read<AppointmentsVM>().applyFilterOnBranches(index: 0);
|
|
|
|
|
},
|
|
|
|
|
).horPaddingMain(),
|
|
|
|
|
MyRecentBranchesWidget(nearbyBranches: appointmentVM.myRecentBranches).horPaddingMain(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
if (appointmentVM.nearbyBranches.isNotEmpty) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
ViewAllWidget(
|
|
|
|
|
title: LocaleKeys.myNearbyBranches.tr().toUpperCase(),
|
|
|
|
|
subTitle: LocaleKeys.view_all.tr(),
|
|
|
|
|
onSubtitleTapped: () {
|
|
|
|
|
context.read<DashboardVmCustomer>().onNavbarTapped(0);
|
|
|
|
|
context.read<AppointmentsVM>().applyFilterOnBranches(index: 0);
|
|
|
|
|
},
|
|
|
|
|
).horPaddingMain(),
|
|
|
|
|
MyRecentBranchesWidget(nearbyBranches: appointmentVM.nearbyBranches).horPaddingMain(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
// 7.height,
|
|
|
|
|
// Consumer(
|
|
|
|
|
// builder: (BuildContext context, AppointmentsVM appointmentVM, Widget? child) {
|
|
|
|
|
// if (appointmentVM.state == ViewState.busy) {
|
|
|
|
|
// return Center(child: CircularProgressIndicator());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if (appointmentVM.myRecentBranches.isNotEmpty) {
|
|
|
|
|
// return Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// ViewAllWidget(
|
|
|
|
|
// title: LocaleKeys.myRecentBranches.tr().toUpperCase(),
|
|
|
|
|
// subTitle: '',
|
|
|
|
|
// onSubtitleTapped: () {
|
|
|
|
|
// // context.read<DashboardVmCustomer>().onNavbarTapped(0);
|
|
|
|
|
// // context.read<AppointmentsVM>().applyFilterOnBranches(index: 0);
|
|
|
|
|
// },
|
|
|
|
|
// ).horPaddingMain(),
|
|
|
|
|
// MyRecentBranchesWidget(nearbyBranches: appointmentVM.myRecentBranches).horPaddingMain(),
|
|
|
|
|
// ],
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// if (appointmentVM.nearbyBranches.isNotEmpty) {
|
|
|
|
|
// return Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// ViewAllWidget(
|
|
|
|
|
// title: LocaleKeys.myNearbyBranches.tr().toUpperCase(),
|
|
|
|
|
// subTitle: LocaleKeys.view_all.tr(),
|
|
|
|
|
// onSubtitleTapped: () {
|
|
|
|
|
// context.read<DashboardVmCustomer>().onNavbarTapped(0);
|
|
|
|
|
// context.read<AppointmentsVM>().applyFilterOnBranches(index: 0);
|
|
|
|
|
// },
|
|
|
|
|
// ).horPaddingMain(),
|
|
|
|
|
// MyRecentBranchesWidget(nearbyBranches: appointmentVM.nearbyBranches).horPaddingMain(),
|
|
|
|
|
// ],
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return SizedBox();
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
// ADS SECTION
|
|
|
|
|
Consumer(
|
|
|
|
|