appwrite_auth_kit icon indicating copy to clipboard operation
appwrite_auth_kit copied to clipboard

Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>'

Open skyface753 opened this issue 2 years ago • 0 comments

I get the following error with the new Version 0.9.0

Unhandled Exception: type 'Null' is not a subtype of type 'List'

The error gets thrown in file lib/src/accounts_provider.dart, when the Appwrite SDK calls models.User.fromMap(res.data); to get the current session. When no User is logged in, the appwrite sdk throws an Null exception, which is unhandled (I think this is the Problem, but I`m not sure).

With Version 0.8.0 it works perfectly

StackTrace:

#0      new User.fromMap (package:appwrite/src/models/user.dart:87:18)
#1      Account.get (package:appwrite/services/account.dart:23:24)
<asynchronous suspension>
#2      AuthNotifier._getUser (package:appwrite_auth_kit/src/accounts_provider.dart:65:15)
<asynchronous suspension>

skyface753 avatar Oct 31 '23 12:10 skyface753