How We Built a Bluetooth (BLE) App for IoT Devices with FlutterFlow

How We Built a Bluetooth (BLE) App for IoT Devices with FlutterFlow

By:
Roberto Requena
Published on:
June 30, 2025

We recently wrapped up an interesting MLP (Minimal Lovable Product) at Flywheel: building a location tracking app for IoT devices using Bluetooth (BLE) and FlutterFlow. 

This answers a question we often get from current and prospective clients: "Can FlutterFlow handle Bluetooth apps for hardware devices?" The short answer is yes, but with custom code. And if you’re interested in the long answer, here’s exactly what we built and how we did it.

The first challenge: location tracking without built-in GPS

Our client needed real-time location tracking for their IoT device. The problem was, the device they had did not have a built-in GPS chip, which is usually required.

We came up with a temporary workaround: use the smartphone's GPS instead with Bluetooth confirming the device is nearby. It's not perfect because you're getting the phone's location instead of the device's exact position, but for this particular use case, "somewhere within Bluetooth range" was sufficient.

We also discovered that “somewhere within Bluetooth range” is not a set distance. The range is typically described as 10 meters, but real-world performance can vary. Indoors with walls, you might get 3-5 meters. Outdoors with a clear line of sight, you could get 15 meters on a good day. Environmental factors like interference, obstacles, even weather affect the connection and range, so location data is always an approximation based on where the phone and device are.

System Architecture for Smartphone-Assisted IoT Device Location via Bluetooth.

Why FlutterFlow

We work with a lot of startups who need to validate their ideas quickly. For this project, FlutterFlow and Firebase allowed us to do just that.

FlutterFlow’s visual builder lets us iterate on UI designs fast. Instead of coding screens from scratch, we could mock them up quickly, show them to the client, get their feedback, and adjust accordingly. When you're trying to translate someone's vision into something they can actually touch and test, development speed matters.

FlutterFlow also gave us full flexibility and extensibility. When we hit limitations or needed to handle more complex logic, particularly with the Bluetooth integration, we were able to supplement custom Dart code.

Implementing the Bluetooth connectivity

We started with the FlutterFlow project setup and Firebase configuration, then focused our attention on the core technology: implementing Bluetooth Low Energy (BLE) connection between the IoT device and smartphone.

This required developing a suite of custom actions within FlutterFlow to handle essential Bluetooth operations:

Device Scanning: Discovering nearby IoT devices.

Device Identification: Validating the target device by its serial number.

Connection State Management: Continuously checking the Bluetooth connection status (connected, disconnected, connecting).

Automatic Reconnection: Implementing a process to re-establish the connection if dropped.

We evaluated several Flutter Bluetooth packages and selected flutter_blue_plus because of its comprehensive feature set and reactive programming model, which was crucial for managing real-time connection state changes effectively.

A critical aspect of this system was continuously monitoring the Bluetooth connection status. Only when a stable connection was confirmed between the smartphone and the IoT device would the application save the smartphone's current GPS coordinates to our Firebase backend. This approach enabled us to build an accurate location history for the IoT device, specifically logging its last known position when actively paired with the phone.

Event-Driven Bluetooth: Real-time Connection State Updates via flutter_blue_plus.

GPS Integration and Battery Optimization

For location services, we used geolocator with the same reactive principle. Its robust functionality and specifically its support for a reactive programming model—providing location updates as streams—made it the ideal choice for our needs.

Implementing Reactive GPS Service Monitoring with geolocator's getServiceStatusStream().

Battery life was a main consideration in the architecture design. Location tracking and Bluetooth communication are both very battery intensive. If we had gone with the obvious approach of checking location and connection status every few seconds, we would have drained the battery within hours.

We solved this with “event-driven” architecture. This means the app only takes action when an event occurs such as a location update, a Bluetooth connection change, or a device disconnect. How it works is when the GPS provides a new location, the app checks if the Bluetooth device is currently connected. If yes, it saves that location to the database. If no, it does nothing. There’s no constant polling or database writes in the background for no reason. 

Example Document from devices_locations_history Collection in Firebase Firestore.

What We Learned: A Senior Developer’s Perspective

Event-driven architecture is a must

The Challenge: Continuous location tracking and Bluetooth communication are battery-intensive. A polling approach that repeatedly checks for location or connection changes would drain user devices quickly.

Our Solution: We adopted a reactive, event-driven architecture throughout development. Using reactive streams from flutter_blue_plus (for Bluetooth state) and geolocator (for GPS updates), our application only consumed resources when actual changes occurred. The app only executed processes like saving data to the backend in direct response to new location updates or changes in Bluetooth connection status. This conserved battery life and ensured efficiency, preventing redundant location data from being sent to Firebase if the device hadn't moved.

Hardware limitations are not a dealbreaker

The Challenge: The target IoT device lacked its own GPS chip, making direct location tracking impossible.

Our Solution: We used the connected smartphone's GPS as a proxy for the IoT device's location, with Bluetooth connectivity serving as the validation link. This required careful logic to manage the relationship between the two devices and acknowledge the inherent constraints—location accuracy tied to Bluetooth range (approximately 10 meters) and environmental factors. FlutterFlow and custom actions were key to building this proxy logic.

Custom bluetooth integration is essential

The Challenge: Bluetooth communication for IoT devices goes beyond simple pairing. It involves discovery, identification (like validating serial numbers), connection state management, and graceful handling of disconnections and reconnections.

Our Solution: You need comprehensive Bluetooth management from the start. We built custom actions for device scanning, identification, state monitoring, and automatic reconnection. The reactive programming model in flutter_blue_plus was crucial for managing real-time connection state changes effectively.

Screenshots of the Final Location Tracking Application – Map View and QR Code Pairing.

The bottom line

FlutterFlow has a key role to play in building IoT Bluetooth applications. This project demonstrates that it can handle sophisticated IoT development when combined with custom Dart code for hardware integration.

For startups looking to validate concepts fast, this hybrid approach offers the best of both worlds – visual development speed where it works, and full technical extensibility where you need it. FlutterFlow handles UI, navigation, and database operations quickly, while custom Dart code tackles the specialized Bluetooth and GPS functionality.

Interested in a free app review?

Schedule a call

Starting a new project or want to chat with us?

Subscribe