Please do not split topics across several threads.
This makes following the conversation in the threads view very hard as the context of the other messages is missing.
If you have additional information either edit the original message or post to its thread.
Also please never anywhere share screenshots of text if you only want to share the text and not something additional like colors or IDE annotations. Text in images is hard to read, especially on mobile, very hard to copy, and nearly impossible to search for.
Regarding the problem, that you run it on Gradle does not make it a problem with Gradle. You have a compilation error, so you question has nothing at all to do with Gradle and thus is off-topic here. You need to ask in some Dart community if you need help with that.