QOL: Data display load Mzansi Direct pt1
This commit is contained in:
@@ -38,21 +38,23 @@ class _MihAddBookmarkAlertState extends State<MihAddBookmarkAlert> {
|
||||
directoryProvider,
|
||||
);
|
||||
List<Business> favBus = [];
|
||||
Map<String, ImageProvider<Object>?> favBusImages = {};
|
||||
String businessLogoUrl = "";
|
||||
// Map<String, ImageProvider<Object>?> favBusImages = {};
|
||||
Map<String, Future<String>> favBusImages = {};
|
||||
// String businessLogoUrl = "";
|
||||
Future<String> businessLogoUrl;
|
||||
for (var bus in directoryProvider.bookmarkedBusinesses) {
|
||||
await MihBusinessDetailsServices()
|
||||
.getBusinessDetailsByBusinessId(bus.business_id)
|
||||
.then((business) async {
|
||||
favBus.add(business!);
|
||||
businessLogoUrl = await MihFileApi.getMinioFileUrl(business.logo_path);
|
||||
favBusImages[business.business_id] =
|
||||
businessLogoUrl != "" ? NetworkImage(businessLogoUrl) : null;
|
||||
businessLogoUrl = MihFileApi.getMinioFileUrl(business.logo_path);
|
||||
favBusImages[business.business_id] = businessLogoUrl;
|
||||
// businessLogoUrl != "" ? NetworkImage(businessLogoUrl) : null;
|
||||
});
|
||||
}
|
||||
directoryProvider.setFavouriteBusinesses(
|
||||
businesses: favBus,
|
||||
businessesImages: favBusImages,
|
||||
businessesImagesUrl: favBusImages,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,21 +43,23 @@ class _MihDeleteBookmarkAlertState extends State<MihDeleteBookmarkAlert> {
|
||||
directoryProvider,
|
||||
);
|
||||
List<Business> favBus = [];
|
||||
Map<String, ImageProvider<Object>?> favBusImages = {};
|
||||
String businessLogoUrl = "";
|
||||
// Map<String, ImageProvider<Object>?> favBusImages = {};
|
||||
Map<String, Future<String>> favBusImages = {};
|
||||
// String businessLogoUrl = "";
|
||||
Future<String> businessLogoUrl;
|
||||
for (var bus in directoryProvider.bookmarkedBusinesses) {
|
||||
await MihBusinessDetailsServices()
|
||||
.getBusinessDetailsByBusinessId(bus.business_id)
|
||||
.then((business) async {
|
||||
favBus.add(business!);
|
||||
businessLogoUrl = await MihFileApi.getMinioFileUrl(business.logo_path);
|
||||
favBusImages[business.business_id] =
|
||||
businessLogoUrl != "" ? NetworkImage(businessLogoUrl) : null;
|
||||
businessLogoUrl = MihFileApi.getMinioFileUrl(business.logo_path);
|
||||
favBusImages[business.business_id] = businessLogoUrl;
|
||||
// businessLogoUrl != "" ? NetworkImage(businessLogoUrl) : null;
|
||||
});
|
||||
}
|
||||
directoryProvider.setFavouriteBusinesses(
|
||||
businesses: favBus,
|
||||
businessesImages: favBusImages,
|
||||
businessesImagesUrl: favBusImages,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user