File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/supabase_flutter/lib/src Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import 'dart:async' ;
2+ import 'dart:developer' as dev;
23
34import 'package:async/async.dart' ;
45import 'package:flutter/foundation.dart' ;
@@ -90,7 +91,7 @@ class Supabase {
9091 _instance._debugEnable = debug ?? kDebugMode;
9192
9293 if (_instance._debugEnable) {
93- _log .onRecord.listen ((record) {
94+ _instance._logSubscription = Logger ( 'supabase' ) .onRecord.listen ((record) {
9495 if (record.level >= Level .INFO ) {
9596 debugPrint (
9697 '${record .loggerName }: ${record .level .name }: ${record .message } ${record .error ?? "" }' );
@@ -157,9 +158,12 @@ class Supabase {
157158 /// Wraps the `recoverSession()` call so that it can be terminated when `dispose()` is called
158159 late CancelableOperation _restoreSessionCancellableOperation;
159160
161+ StreamSubscription ? _logSubscription;
162+
160163 /// Dispose the instance to free up resources.
161164 Future <void > dispose () async {
162165 await _restoreSessionCancellableOperation.cancel ();
166+ _logSubscription? .cancel ();
163167 client.dispose ();
164168 _instance._supabaseAuth.dispose ();
165169 _initialized = false ;
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ class SupabaseAuth with WidgetsBindingObserver {
288288 Future <void > _handleDeeplink (Uri uri) async {
289289 if (! _isAuthCallbackDeeplink (uri)) return ;
290290
291- _log.fine ('handle deeplink uri: $uri ' );
291+ _log.finest ('handle deeplink uri: $uri ' );
292292 _log.info ('handle deeplink uri' );
293293
294294 try {
You can’t perform that action at this time.
0 commit comments