April 2024
Hi there, i followed along, but i am running into an error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
which is for this line of code
List<User> users = (await ApiService().getUsers())!;
can’t seem to find a solution/fix to correct this.
any help would be much appreciated
April 2024
Hey! 
I’ve got some issues, is here something missing?
-
the dotenv will not be initialized?
await dotenv.load(fileName: “.env”);
is missing in the main.dart
-
if i try to register a user, i get the error that “role” is a necessary field? There isnt a single word about roles in this article - but yeah, in the model “user” in strapi that field is required. When using postman, you’ll get the same error as in Flutter. In Strapi there are two default roles “Public” and “Authenticated”. But i cant hand over any of these in the body of my post-request?
Would appreciate some more information on that topic 
Kind regards,
Alex
1 reply
May 2024
▶ feardrivenDev
After further investigation:
In a standard installation of Strapi, the “User & Permission”-Plugin is now activated from the start on.
So a simple post to the endpoint /users will have the role field as mandatory. But with that plugin you shouldn’t trigger the endpoint directly.
Instead trigger the url /auth/local/register for SignUp and /auth/local for SignIn.
June 2024
how is it save to login a user by getting the list of users and checking if it has the same email as you filled in without checking the password? Or am I missing something?