Skip to content

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

@skyface753

Description

@skyface753

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions