---
title: "Building an Uber Clone with Flutter and Supabase"
description: "An Uber-style consumer ride app can be built with Flutter on top of Supabase, using PostGIS geography columns to store driver locations and Supabase Realtime to stream the driver's position onto a Google Map."
url: "https://swe.quest/articles/building-an-uber-clone-with-flutter-and-supabase-eaa64bc8188b0796"
canonical: "https://supabase.com/blog/flutter-uber-clone"
source: "Supabase"
published: "2024-09-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 15
tags: ["mobile","postgres","geospatial","realtime"]
---

# Building an Uber Clone with Flutter and Supabase

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-09-05, 15 min read, How-to. Original: [https://supabase.com/blog/flutter-uber-clone](https://supabase.com/blog/flutter-uber-clone)

## Summary

An Uber-style consumer ride app can be built with Flutter on top of Supabase, using PostGIS geography columns to store driver locations and Supabase Realtime to stream the driver's position onto a Google Map. The tutorial walks through the drivers and rides schema, with generated latitude/longitude columns and row-level security policies. A trigger keeps driver availability in sync with ride status, and a security-definer find\_driver function uses ST\_DWithin and KNN ordering to pick the nearest available driver within 3,000 m and create the ride. On the client, a five-state Flutter UI calls an Edge Function wrapping Google's Routes API to draw the route polyline, compute a fare and subscribe to ride and driver updates.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Maps & geospatial](https://swe.quest/tags/geospatial.md) (Domains)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)

## Prerequisites

- Flutter and Dart basics
- SQL and Postgres basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

Supabase, Flutter, PostGIS, Supabase Realtime, Google Maps, Supabase Edge Functions, row level security

## Related posts

- [Postgres Realtime location sharing with MapLibre](https://swe.quest/articles/postgres-realtime-location-sharing-with-maplibre-f6d03ffa8efe5716.md): Supabase · 2024-07-04 · Medium · 5 min read · Real-time systems, Maps & geospatial, PostgreSQL, React, Serverless
  Live location sharing is built by having a Telegram bot running in a Supabase Edge Function (grammY on Deno) capture edited-location updates and write them to Postgres through a PL/pgSQL RPC.
- [Geo Queries with PostGIS in Ionic Angular](https://swe.quest/articles/geo-queries-with-postgis-in-ionic-angular-9afa3d65d6fa3030.md): Supabase · 2023-03-01 · Medium · 20 min read · PostgreSQL, Maps & geospatial, Mobile, Frontend
  PostGIS on Supabase handles geo data for an Ionic Angular app with a Capacitor Google Map.
- [Flutter Tutorial: building a Flutter chat app](https://swe.quest/articles/flutter-tutorial-building-a-flutter-chat-app-942d133b45bb7fa6.md): Supabase · 2022-06-30 · Medium · 19 min read · Mobile, Real-time systems, PostgreSQL, Communications
  A real-time single-room chat app can be built with Flutter on the frontend and Supabase as the entire backend, using the supabase\_flutter SDK instead of a custom API.
- [Flutter Authorization with RLS](https://swe.quest/articles/flutter-authorization-with-rls-f1170d28eed05738.md): Supabase · 2022-11-22 · Medium · 25 min read · PostgreSQL, Identity & auth, Mobile, Real-time systems
  Extends a basic Flutter real-time chat app into a 1-on-1 chat with authorization enforced by PostgreSQL Row Level Security on Supabase.
- [Making a Real-Time Chat App with Supabase on Replit](https://swe.quest/articles/making-a-real-time-chat-app-with-supabase-on-replit-0a77c4de25e9cc9d.md): Replit · 2022-03-23 · Medium · 8 min read · Real-time systems, Frontend, JavaScript, PostgreSQL
  A real-time public chat app can be built with a Vue 3 and Tailwind CSS frontend on Replit backed by Supabase's hosted Postgres.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
