You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/brick_offline_first_with_supabase/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ The `OfflineFirstWithSupabase` domain uses all the same configurations and annot
9
9
The repository utilizes the `OfflineFirstWithRestRepository`'s queue because the Supabase client is a thin wrapper around the PostgREST API. There's a small amount of configuration to apply this queue:
10
10
11
11
```dart
12
+
// import brick.g.dart and brick/db/schema.g.dart
13
+
12
14
class MyRepository extends OfflineFirstWithSupabaseRepository {
13
15
static late MyRepository? _singleton;
14
16
@@ -24,16 +26,17 @@ class MyRepository extends OfflineFirstWithSupabaseRepository {
24
26
25
27
static void configure({
26
28
required String supabaseUrl,
27
-
required String apiKey,
28
-
required Set<Migration> migrations,
29
+
required String anonKey,
29
30
}) {
30
31
// Convenience method `.clientQueue` makes creating the queue and client easy.
31
32
final (client, queue) = OfflineFirstWithSupabaseRepository.clientQueue(
33
+
// For Flutter, use import 'package:sqflite/sqflite.dart' show databaseFactory;
34
+
// For unit testing (even in Flutter), use import 'package:sqflite_common_ffi/sqflite_ffi.dart' show databaseFactory;
0 commit comments