Flutter - Airbnb Clone
final listingProvider = FutureProvider.family<Listing, String>((ref, id) async final repo = ref.watch(listingRepoProvider); return await repo.getListingById(id); ); final wishlistProvider = StateNotifierProvider<WishlistNotifier, List<String>>((ref) return WishlistNotifier(ref.read(wishlistRepoProvider)); ); 6. Database Schema (Firestore Example) // users/userId
// listings/listingId
DateRangePickerController controller = DateRangePickerController(); // Fetch booked dates for this listing List<DateTime> bookedDates = await bookingRepo.getBookedDates(listingId); @override Widget build(BuildContext context) return SfDateRangePicker( controller: controller, selectionMode: DateRangePickerSelectionMode.range, onSelectionChanged: (args) /* update price & days */ , blackoutDates: bookedDates, monthCellStyle: DateRangePickerMonthCellStyle( blackoutDateDecoration: BoxDecoration(color: Colors.grey[200]), ), ); flutter airbnb clone
Using syncfusion_flutter_datepicker to disable already booked dates (fetch from Firestore).
senderId, text, timestamp, read
// messages/chatRoomId/messages/messageId
// bookings/bookingId 'cancelled', stripePaymentIntentId, createdAt final listingProvider = FutureProvider
bookingId, listingId, authorId, rating, comment, createdAt
hostId, title, description, location (GeoPoint), address, pricePerNight, cleaningFee, guestsAllowed, amenities: [wifi, kitchen, pool], images: [url1, url2], bookedDates: [timestamp1, timestamp2], createdAt final listingProvider = FutureProvider.family<