quicui_supabase library

Quicui Supabase Plugin

Supabase implementation for the QuicUI framework.

This plugin provides complete Supabase integration for QuicUI, enabling:

  • Dynamic UI rendering from cloud-based screen definitions
  • Real-time synchronization of UI changes
  • Offline-first architecture with automatic sync
  • PostgreSQL data persistence
  • User authentication integration

Quick Start

import 'package:quicui_supabase/quicui_supabase.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final dataSource = SupabaseDataSource(
    supabaseUrl: 'https://your-project.supabase.co',
    supabaseAnonKey: 'your-anon-key',
  );

  DataSourceProvider.instance.register(dataSource);
  await dataSource.connect();

  runApp(const MyApp());
}

Architecture

The plugin implements the DataSource interface from QuicUI core:

QuicUI Core
  ↓
DataSource Interface (Abstract)
  ↓
SupabaseDataSource (This Plugin)
  ↓
Supabase Backend

Features

  • Screen Management: Fetch, save, search, and delete screens
  • Real-Time Updates: Subscribe to live screen changes
  • Sync Operations: Automatic conflict resolution and offline sync
  • Connection Management: Connect/disconnect with proper cleanup
  • Error Handling: Comprehensive error types for debugging

Integration with QuicUI

After registering the DataSource:

final repository = ScreenRepository(
  dataSource: DataSourceProvider.instance.get(),
);

final screen = await repository.getScreen('home_screen');

Real-Time Subscriptions

final dataSource = DataSourceProvider.instance.get();
final stream = dataSource.subscribeToScreen('home_screen');
stream.listen((event) {
  print('Screen updated: ${event.type}');
});

Documentation

Requirements

  • QuicUI v2.0.0 or higher
  • supabase_flutter v1.10.0 or higher
  • Flutter 3.16.0 or higher
  • Dart 3.0.0 or higher

Classes

SupabaseDataSource
Supabase implementation of the DataSource interface
SupabaseRealtimeManager
Manages real-time subscriptions to Supabase

Exceptions / Errors

SupabaseDataSourceException
Exception thrown by Supabase DataSource operations