Skip to content

🐛 Bug Report: Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>' #173

@jtmuller5

Description

@jtmuller5

👟 Reproduction steps

I see an error when trying to create a new account:

E/flutter (14287): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'List<dynamic>'
E/flutter (14287): #0      new User.fromMap (package:appwrite/src/models/user.dart:87:18)
E/flutter (14287): #1      Account.create (package:appwrite/services/account.dart:57:24)
E/flutter (14287): <asynchronous suspension>
E/flutter (14287): #2      AppwriteService.createEmailAccount (package:appwrite_auth_ui/src/components/services/appwrite_service.dart:81:19)
E/flutter (14287): <asynchronous suspension>
E/flutter (14287): #3      AppwriteSignupState.onSignup (package:appwrite_auth_ui/src/components/screens/signup/signup.dart:29:43)
E/flutter (14287): <asynchronous suspension>
E/flutter (14287): 

Apparently the "labels" property is required in the User model but its not returned by the create() method.

👍 Expected behavior

Don't require the labels property on the User model or return the labels list in the create response.

👎 Actual Behavior

An error is thrown

🎲 Appwrite version

Version 2.0.x

💻 Operating system

MacOS

🧱 Your Environment

Basic Flutter app in Android studio. Running on emulator

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions