Question
Do I need to do something to get the analyzer to work in Visual Studio Code when an @required parameter is omitted from a Dart function?
Code
import 'package:meta/meta.dart';
void sayHello({@required String to, bool inEnglish}){
if(inEnglish == null || inEnglish){
print("Hello, $to");
} else {
print("Bonjour, $to");
}
}
main(){
sayHello(inEnglish: true); // output: Hello, null, no complaints about **to** missing
}