Skip to main content
Learn how to integrate Supabase with Flutter to build beautiful, cross-platform mobile applications for iOS and Android with authentication, real-time data, and file storage.

Why Flutter + Supabase?

  • Cross-platform - Build for iOS and Android from a single codebase
  • Native performance with Flutter’s engine
  • Real-time subscriptions for live updates
  • Type-safe Dart integration
  • Offline support with local caching
  • Deep links for OAuth and magic links

Quick Start

1

Create a Flutter App

2

Install Supabase

Add to pubspec.yaml:
Install dependencies:
3

Configure Deep Links

For iOS, update ios/Runner/Info.plist:
For Android, update android/app/src/main/AndroidManifest.xml:
4

Initialize Supabase

Update lib/main.dart:

Authentication

Splash Screen

Create a splash screen to check auth status:

Login Page

Database Operations

Fetching Data

Inserting Data

Real-time Subscriptions

File Upload

Best Practices

Dispose Resources

Always dispose controllers and unsubscribe from channels.

Error Handling

Use try-catch blocks and show user-friendly error messages.

Loading States

Show loading indicators during async operations.

Deep Links

Configure deep links for OAuth and magic link authentication.

State Management

Consider using Provider, Riverpod, or Bloc for complex apps.

Next Steps

User Management

Build user profiles with avatars

File Uploads

Handle file storage

Realtime Chat

Build a chat app

Examples

Explore Flutter examples