Hello, What are the probable causes for this exception when I run the getCurrentUser:
Future<User> getCurrentUser() async =>
Account(_client).get().then((value) => value);```
Exception```Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>'```
#0 new User.fromMap (package:appwrite/src/models/user.dart:87:18)
#1 Account.get (package:appwrite/services/account.dart:23:24)
<asynchronous suspension>```
What version of Appwrite are you on and what version of the Appwrite flutter sdk are you using?
Hello Steve,
appwrite: ^11.0.0 => flutter Appwrite console version 1.3.7
Version 11 of the Appwrite flutter sdk is meant for Appwrite 1.4. Please downgrade, checking the readme to see what version you should use
I just downgraded the flutter plugin to 9.0.0 and it worked! That's the workaround I guess?
Perfect. Thank you!
[SOLVED] Exception when retrieving current user
Recommended threads
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...