---
title: "Flutter Tutorial: building a Flutter chat app"
description: "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."
url: "https://swe.quest/articles/flutter-tutorial-building-a-flutter-chat-app-942d133b45bb7fa6"
canonical: "https://supabase.com/blog/flutter-tutorial-building-a-chat-app"
source: "Supabase"
published: "2022-06-30"
difficulty: "medium"
kind: "How-to"
reading_minutes: 19
tags: ["mobile","realtime","postgres","communications"]
---

# Flutter Tutorial: building a Flutter chat app

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2022-06-30, 19 min read, How-to. Original: [https://supabase.com/blog/flutter-tutorial-building-a-chat-app](https://supabase.com/blog/flutter-tutorial-building-a-chat-app)

## Summary

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. The walkthrough creates profiles and messages tables in Postgres with username validation constraints, adds the messages table to the supabase\_realtime publication for live updates, initializes the Supabase client, routes users via a splash page based on auth session, and defines Dart data models plus a registration page. Authentication and row-level security are deferred to a second part.

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)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Communications](https://swe.quest/tags/communications.md) (Domains)

## Prerequisites

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

## Keywords

Flutter, Supabase, supabase\_flutter, PostgreSQL, Dart

## Related posts

- [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.
- [Supabase Flutter SDK 1.0 Developer Preview](https://swe.quest/articles/supabase-flutter-sdk-1-0-developer-preview-9e19816587705422.md): Supabase · 2022-08-02 · Medium · 5 min read · Mobile, Identity & auth, API design
  Supabase Flutter SDK 1.0 enters developer preview with a focus on developer experience.
- [Create a Figma Clone app with Flutter and Supabase Realtime](https://swe.quest/articles/create-a-figma-clone-app-with-flutter-and-supabase-realtime-bc5c75e7ac04059a.md): Supabase · 2024-01-26 · Medium · 20 min read · Real-time systems, Mobile, Frontend, PostgreSQL
  A collaborative design canvas, a simplified Figma, built by combining Supabase Realtime Broadcast for low-latency client-to-client messaging with Flutter's CustomPainter for low-level canvas rendering.
- [Supabase Realtime: Broadcast and Presence Authorization](https://swe.quest/articles/supabase-realtime-broadcast-and-presence-authorization-db4d8e985aa735a7.md): Supabase · 2024-08-13 · Medium · 6 min read · Real-time systems, Identity & auth, PostgreSQL
  Supabase Realtime now supports authorization for Broadcast and Presence channels using Postgres Row Level Security policies on a managed \`realtime.messages\` table, where SELECT policies govern receiving and INSERT policies govern sending.

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)
