Build a trip itinerary planner using Firestore subcollections: trips at the top level, days nested under each trip, and activities nested under each day. Display the itinerary in a TabBar with one tab per day, each showing a timeline ListView of activities sorted by start time. Add Google Maps integration to show daily activities as markers with route polylines, a budget tracker summing activity costs, and an activity form with Google Places autocomplete for location search.
Building a Dynamic Travel Itinerary Planner in FlutterFlow
A great trip starts with a great itinerary. This tutorial builds a dynamic planner where travelers create trips, organize activities day by day with times and locations, view their daily route on a map, and track spending against a trip budget. The day-by-day TabBar and timeline layout make even complex multi-day trips easy to navigate.
Prerequisites
- A FlutterFlow project with Firestore and authentication configured
- Google Maps API key configured in FlutterFlow project settings
- Google Places API enabled for location autocomplete
- Basic familiarity with Firestore subcollections and TabBar in FlutterFlow
Step-by-step guide
Create the Firestore data model for trips, days, and activities
Create the Firestore data model for trips, days, and activities
Create a trips collection with fields: userId (String), destination (String), startDate (Timestamp), endDate (Timestamp), coverImageUrl (String), budget (Double), totalSpent (Double, calculated). Under each trip, create a days subcollection with fields: dayNumber (Integer), date (Timestamp). Under each day, create an activities subcollection with fields: title (String), startTime (Timestamp), endTime (Timestamp), location (String), latitude (Double), longitude (Double), notes (String), category (String: transport, hotel, sightseeing, food, activity), cost (Double). When a new trip is created, automatically generate day documents based on the date range between startDate and endDate.
Expected result: Firestore has a three-level hierarchy: trips → days → activities, with day documents auto-generated from the trip date range.
Build the trip list and creation flow
Build the trip list and creation flow
Create a TripsPage with a ListView querying trips filtered by userId equals currentUser.uid, ordered by startDate descending. Each trip card shows the coverImageUrl as a background, destination name, date range, and a progress indicator for budget spent. Add a FloatingActionButton that opens a BottomSheet with the trip creation form: destination TextField, startDate and endDate DatePickers, budget TextField (numeric), and a coverImageUrl upload with FlutterFlowUploadButton. On Save, create the trip document and then use a Custom Action to calculate the number of days between start and end dates and create a day document for each in the days subcollection.
Expected result: Users can create trips with dates and budgets, and day documents are automatically generated for the itinerary structure.
Build the day-by-day TabBar with activity timelines
Build the day-by-day TabBar with activity timelines
Create a TripDetailPage with Route Parameter tripRef. Query the days subcollection ordered by dayNumber ascending. Build a TabBar dynamically with one tab per day, labeled 'Day 1', 'Day 2', and so on with the date below each label. Each tab's content is a ListView querying the activities subcollection for that day, ordered by startTime ascending. Each activity row is a Container styled as a timeline card: a vertical line on the left with a colored dot (color by category: blue for transport, green for sightseeing, orange for food, purple for hotel), the time range on the left, and the activity title, location, and cost on the right. Add a plus FloatingActionButton to add a new activity to the currently selected day.
Expected result: A TabBar with one tab per trip day, each showing a chronological timeline of activities with category-colored indicators.
Add Google Maps integration showing daily routes
Add Google Maps integration showing daily routes
Above the activity timeline on each day tab, add a FlutterFlowGoogleMap widget with a fixed height of 250. Query the day's activities and place a marker for each activity at its latitude and longitude coordinates. Customize marker colors by category using the same color scheme as the timeline. Draw a Polyline connecting activities in chronological order to show the day's route. On marker tap, show the activity title and time in the map's info window. Add a Directions button below the map that constructs a Google Maps URL with all activity locations as waypoints and opens it with url_launcher for turn-by-turn navigation.
Expected result: A map above each day's timeline showing activity markers connected by a route polyline, with a button for navigation directions.
Build the activity creation form with Places autocomplete
Build the activity creation form with Places autocomplete
Create an Add Activity BottomSheet with fields: title TextField, category DropDown (transport, hotel, sightseeing, food, activity), startTime and endTime TimePickers, location TextField with Google Places autocomplete integration, cost TextField (numeric), and notes TextField (multiline). For location autocomplete, use FlutterFlow's built-in Google Places integration or a Custom Widget that calls the Places Autocomplete API. When the user selects a place, auto-fill the location name and extract latitude and longitude from the Places result. On Save, create the activity document in the selected day's activities subcollection and update the trip's totalSpent by adding the activity cost.
Expected result: An activity form with location autocomplete that saves activities with geographic coordinates for map display.
Add budget tracking and trip overview
Add budget tracking and trip overview
On the TripDetailPage header, add a budget summary Row showing totalSpent out of budget with a LinearPercentIndicator. Color the indicator green when under 75 percent, yellow at 75-90 percent, and red above 90 percent. Create a Custom Function that sums all activity costs across all days for the trip to calculate totalSpent. Trigger this calculation on page load and after any activity is added, edited, or deleted. Add a budget breakdown by category: a Container showing how much was spent on transport, food, sightseeing, hotel, and activities using colored bars or a simple list. On the TripsPage, show the budget percentage on each trip card for quick status overview.
Expected result: A real-time budget tracker showing total spend, percentage used, and per-category breakdown with color-coded alerts.
Complete working example
1FIRESTORE DATA MODEL:2 trips/{tripId}3 userId: String4 destination: String5 startDate: Timestamp6 endDate: Timestamp7 coverImageUrl: String8 budget: Double9 totalSpent: Double10 └── days/{dayId}11 dayNumber: Integer12 date: Timestamp13 └── activities/{activityId}14 title: String15 startTime: Timestamp16 endTime: Timestamp17 location: String18 latitude: Double19 longitude: Double20 notes: String21 category: "transport" | "hotel" | "sightseeing" | "food" | "activity"22 cost: Double2324PAGE: TripsPage25WIDGET TREE:26 Column27 ├── Text ("My Trips")28 └── ListView (trips, userId == currentUser, order startDate desc)29 └── Container (trip card)30 ├── Image (coverImageUrl, background)31 ├── Text (destination + dates)32 └── LinearPercentIndicator (totalSpent / budget)33 FAB: + Create Trip → BottomSheet3435PAGE: TripDetailPage36 Route Parameter: tripRef37WIDGET TREE:38 Column39 ├── Container (header: destination + dates)40 ├── Row (budget: totalSpent / budget + LinearPercentIndicator)41 ├── Container (budget breakdown by category)42 └── TabBar (dynamic: one tab per day)43 └── Tab Content per day:44 ├── FlutterFlowGoogleMap (height: 250)45 │ Markers: activities with lat/lng, colored by category46 │ Polyline: connecting activities in time order47 ├── Button (Get Directions → Google Maps URL)48 └── ListView (activities, order by startTime)49 └── Row (timeline card)50 ├── Column (vertical line + colored dot)51 ├── Text (time range)52 └── Column (title + location + cost)53 FAB: + Add Activity → BottomSheet5455ACTIVITY BOTTOMSHEET:56 Column57 ├── TextField (title)58 ├── DropDown (category)59 ├── Row (startTime + endTime TimePickers)60 ├── TextField (location + Google Places autocomplete)61 ├── TextField (cost, numeric)62 ├── TextField (notes, multiline)63 └── Button (Save Activity)Common mistakes when creating a Dynamic Itinerary Planner for Travelers in FlutterFlow
Why it's a problem: Not sorting activities by startTime in the Backend Query
How to avoid: Always use orderBy startTime ascending in the Backend Query on the activities subcollection so the timeline reflects the actual schedule.
Why it's a problem: Calculating budget totals by querying all activities on every page load
How to avoid: Update totalSpent incrementally: when an activity is added or deleted, increment or decrement the trip's totalSpent using FieldValue.increment in a Custom Action.
Why it's a problem: Not generating day documents automatically when creating a trip
How to avoid: Automatically calculate the number of days from startDate to endDate and create all day documents in a loop within a Custom Action when the trip is first saved.
Best practices
- Sort activities by startTime ascending for chronological timeline display
- Auto-generate day documents from the trip date range to ensure complete itinerary structure
- Use category-based color coding consistently across timeline dots, map markers, and budget breakdown
- Store latitude and longitude on activities for map marker placement
- Update budget totals incrementally with FieldValue.increment instead of recalculating
- Use Google Places autocomplete for accurate location data and coordinates
- Add a Directions button that opens Google Maps with waypoints for real navigation
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to build a travel itinerary planner in FlutterFlow with Firestore. Show me the data model for trips, days, and activities as nested subcollections, a TabBar for day-by-day navigation, a timeline ListView for activities, Google Maps with route polylines, and budget tracking.
Create a trip detail page with a TabBar at the top showing Day 1, Day 2, Day 3 tabs. Each tab has a small map at the top and a vertical timeline list of activities below with colored dots and time labels on the left.
Frequently asked questions
Can I share my itinerary with travel companions?
Yes. Add a sharedWith array field on the trip document containing user IDs of companions. Query trips where sharedWith arrayContains the current user to show shared trips alongside personal ones. All shared users can view and edit the itinerary.
How do I reorder activities within a day?
The simplest approach is to edit the startTime of an activity, which automatically reorders it in the timeline since the query sorts by startTime. For drag-to-reorder, use a Custom Widget with ReorderableListView and update startTimes on reorder.
Can I add flight or hotel booking details to an activity?
Yes. Add optional fields to activities like confirmationNumber, bookingUrl, and attachmentUrl. For flights specifically, add departureAirport and arrivalAirport fields. Display these details in an expandable section on the activity card.
How do I handle time zone changes during multi-city trips?
Store all times in UTC in Firestore. Add a timezone field to each day document. Display times converted to the local timezone of that day's location using a Custom Function.
Can I export the itinerary as a PDF?
Yes. Create a Custom Action using the pdf Dart package. Iterate through days and activities, generate a formatted PDF with daily schedules and a map screenshot, upload to Firebase Storage, and provide a download link.
Can RapidDev help build a travel planning platform?
Yes. RapidDev can implement full travel platforms with collaborative itinerary planning, booking integrations, offline access, multi-currency budget tracking, photo journals, and real-time location sharing between travel companions.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation