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 1
1
import 'dart:async' ;
2
+ import 'dart:developer' as dev;
2
3
3
4
import 'package:async/async.dart' ;
4
5
import 'package:flutter/foundation.dart' ;
@@ -90,7 +91,7 @@ class Supabase {
90
91
_instance._debugEnable = debug ?? kDebugMode;
91
92
92
93
if (_instance._debugEnable) {
93
- _log .onRecord.listen ((record) {
94
+ _instance._logSubscription = Logger ( 'supabase' ) .onRecord.listen ((record) {
94
95
if (record.level >= Level .INFO ) {
95
96
debugPrint (
96
97
'${record .loggerName }: ${record .level .name }: ${record .message } ${record .error ?? "" }' );
@@ -157,9 +158,12 @@ class Supabase {
157
158
/// Wraps the `recoverSession()` call so that it can be terminated when `dispose()` is called
158
159
late CancelableOperation _restoreSessionCancellableOperation;
159
160
161
+ StreamSubscription ? _logSubscription;
162
+
160
163
/// Dispose the instance to free up resources.
161
164
Future <void > dispose () async {
162
165
await _restoreSessionCancellableOperation.cancel ();
166
+ _logSubscription? .cancel ();
163
167
client.dispose ();
164
168
_instance._supabaseAuth.dispose ();
165
169
_initialized = false ;
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ class SupabaseAuth with WidgetsBindingObserver {
288
288
Future <void > _handleDeeplink (Uri uri) async {
289
289
if (! _isAuthCallbackDeeplink (uri)) return ;
290
290
291
- _log.fine ('handle deeplink uri: $uri ' );
291
+ _log.finest ('handle deeplink uri: $uri ' );
292
292
_log.info ('handle deeplink uri' );
293
293
294
294
try {
You can’t perform that action at this time.
0 commit comments