Closed zlkrnynkrc closed 3 months ago
I cannot reproduce with the same version of Flutter. It's very hard to think that Dart would update their analyzer rule like this without a major version update.
My guess is that you went into the source code of gotrue and made some edits, causing this issue for you. You can try to reset your pub cache. https://dart.dev/tools/pub/cmd/pub-cache#clearing-the-global-system-cache
Thank you. Reseting pub cashe worked
dart automatically updates itself. after update, if i even import supabase_flutter package, i take following error.my pc setup below.
ERROR: /home/xxx/.pub-cache/hosted/pub.dev/gotrue-2.5.1/lib/src/gotrue_client.dart:905:100: Error: Property 'id' cannot be accessed on 'User?' because it is potentially null. ERROR: - 'User' is from 'package:gotrue/src/types/user.dart' ('/home/xxx/.pub-cache/hosted/pub.dev/gotrue-2.5.1/lib/src/types/user.dart'). ERROR: Try accessing using ?. instead. ERROR: final shouldEmitEvent = _currentSession == null || _currentSession?.user?.id != session.user.id; ERROR: ^^ ERROR: /home/xxx/.pub-cache/hosted/pub.dev/gotrue-2.5.1/lib/src/gotrue_mfa_api.dart:177:22: Error: Property 'factors' cannot be accessed on 'User?' because it is potentially null.
Here below my specifications
*Flutter (Channel stable, 3.19.2, on Linux Mint 21.2 5.15.0-97-generic, locale tr_TR.UTF-8) • Flutter version 3.19.2 on channel stable at /home/xxx/Android/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7482962148 (7 days ago), 2024-02-27 16:51:22 -0500 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1 using vscode last version. pubspec.yaml environment: sdk: '>=3.3.0 <4.0.0' dependencies: supabase_flutter: ^2.3.4