I'm working on a quiz app... and this null safety thing is giving me some errors, for example I can not write:
Answer({this.answerText, this.answerColor});
without an error: The parameter 'answerColor' can't have a value of 'null' because of its type, but the implicit default value is 'null'. Try adding either an explicit non-'null' default value or the 'required' modifier.
I allready tried to change the environment: sdk: version... and it kinda worked... but that gave me a new error... once I change the version to 2.11.0 (I have 2.15.1) a new error comes up: "This requires the 'non-nullable' language feature to be enabled. Try updating your pubspec.yaml to set the minimum SDK constraint to 2.12.0 or higher, and running 'pub get'." in this part of the code:
class TrigoEjercicios extends StatefulWidget
const TrigoEjercicios({Key? key}) : super(key: key);
on the question mark... this error is in every .dart file I have on in my proyect So, what can I do? I apologise if this is not clear enough... is my first time here... if you need more information please let me know!