Closed
Description
For example, in the code bellow I need to tell the compiler that these optional parameters are required.
bool run({
String taskId,
String command,
List<String>? args,
}) {
//...
}
This code won't work in the current NNBD implementation, I need to use the required
annotation.
Would be cool if the language consider every non-nullable param as required!?
So I think this:
bool run({
String taskId,
String command,
List<String>? args,
}) {
//...
}
Is better than this:
bool run({
required String taskId,
required String command,
List<String>? args,
}) {
//...
}