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 {
153153 return join (dir.path, dbFilename);
154154}
155155
156+ const options = SyncOptions (syncImplementation: SyncClientImplementation .rust);
157+
156158Future <void > openDatabase () async {
157159 // Open the local database
158160 db = PowerSyncDatabase (
@@ -167,15 +169,15 @@ Future<void> openDatabase() async {
167169 // If the user is already logged in, connect immediately.
168170 // Otherwise, connect once logged in.
169171 currentConnector = SupabaseConnector ();
170- db.connect (connector: currentConnector);
172+ db.connect (connector: currentConnector, options : options );
171173 }
172174
173175 Supabase .instance.client.auth.onAuthStateChange.listen ((data) async {
174176 final AuthChangeEvent event = data.event;
175177 if (event == AuthChangeEvent .signedIn) {
176178 // Connect to PowerSync when the user is signed in
177179 currentConnector = SupabaseConnector ();
178- db.connect (connector: currentConnector! );
180+ db.connect (connector: currentConnector! , options : options );
179181 } else if (event == AuthChangeEvent .signedOut) {
180182 // Implicit sign out - disconnect, but don't delete data
181183 currentConnector = null ;
You can’t perform that action at this time.
0 commit comments