final User user = User.fromMap(context.req.body );
TypeScript
type'List<dynamic>' is not a subtype oftype'Map<String, dynamic>'#0newUser.fromMap (package:dart_appwrite/src/models/user.dart:93)#1main (package:starter_template/main.dart:14)#2 action.<anonymous closure> (file:///usr/local/server/src/server.dart:114)#3_rootRun (dart:async/zone.dart:1399)
Developers are encountering an issue where `context.req.body` returns a list instead of a map. The error indicates a mismatch in types. To resolve this, update the JSON input to have `"prefs":{}` instead of `"prefs":[]`.
Shiba
25 Feb, 2024, 00:42
i am on all latest packages and self hosted latest server