Back

Unhandled Exception: type 'String' is not a subtype of type 'Map<String, dynamic>'

  • 2
  • Flutter
  • Accounts
Dipen
13 Jul, 2023, 09:28

Unhandled Exception: type 'String' is not a subtype of type 'Map<String, dynamic>' in account.dart file in appwrite

TypeScript
await account.createEmailSession(
      email: email,
      password: password,
    );
TL;DR
Title: Unhandled Exception: type 'String' is not a subtype of type 'Map<String, dynamic>'; Solution: The issue was resolved by deleting the code, restarting the laptop, and adding the code again. Additionally, another user suggested trying the code snippet provided in the message.
Dipen
13 Jul, 2023, 11:05

i'm using appwrite flutter version 9.0.1

Asutosh
13 Jul, 2023, 13:52

can you share your complete code

Asutosh
13 Jul, 2023, 14:00

you can try this

TypeScript
final response = await account.createEmailSession( email: email, password: password, );

log(response.userId);
Dipen
14 Jul, 2023, 07:05

it is resolved, idk what happend i just deleted the code and restarted the laptop and again added the code. It worked normally! Thanks 🙂

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more