File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
demos/supabase-todolist/lib Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ Future<String> getDatabasePath() async {
153
153
return join (dir.path, dbFilename);
154
154
}
155
155
156
+ const options = SyncOptions (syncImplementation: SyncClientImplementation .rust);
157
+
156
158
Future <void > openDatabase () async {
157
159
// Open the local database
158
160
db = PowerSyncDatabase (
@@ -167,15 +169,15 @@ Future<void> openDatabase() async {
167
169
// If the user is already logged in, connect immediately.
168
170
// Otherwise, connect once logged in.
169
171
currentConnector = SupabaseConnector ();
170
- db.connect (connector: currentConnector);
172
+ db.connect (connector: currentConnector, options : options );
171
173
}
172
174
173
175
Supabase .instance.client.auth.onAuthStateChange.listen ((data) async {
174
176
final AuthChangeEvent event = data.event;
175
177
if (event == AuthChangeEvent .signedIn) {
176
178
// Connect to PowerSync when the user is signed in
177
179
currentConnector = SupabaseConnector ();
178
- db.connect (connector: currentConnector! );
180
+ db.connect (connector: currentConnector! , options : options );
179
181
} else if (event == AuthChangeEvent .signedOut) {
180
182
// Implicit sign out - disconnect, but don't delete data
181
183
currentConnector = null ;
You can’t perform that action at this time.
0 commit comments