SupabaseRemoteStore constructor

const SupabaseRemoteStore({
  1. required SupabaseClient client,
  2. required String userId(),
  3. String syncStatusTable = 'sync_status',
  4. Map<String, String> tableTimestampKeys = const {},
})

Creates a Supabase remote store.

  • client: Your Supabase client instance.
  • userId: Callback that returns the current authenticated user's ID. Called on every sync cycle so it stays fresh across sign-out/sign-in.
  • syncStatusTable: Name of the sync status table (default: sync_status).
  • tableTimestampKeys: Maps table names to their sync_status column names. Example: {'tasks': 'tasks_at', 'notes': 'notes_at'}.

Implementation

const SupabaseRemoteStore({
  required this.client,
  required this.userId,
  this.syncStatusTable = 'sync_status',
  this.tableTimestampKeys = const {},
});