Fixing `Undefined name 'required' used as an annotation.` in Dart

I saw the `@required` annotation in a Firebase Auth method signature, and tried to override it. However in my project it threw this error:

Undefined name 'required' used as an annotation.
Try defining the name or importing it from another library.dart(undefined_annotation)

What was odd was that when I tried to go to the definition of required in Firebase Auth, VS Code wouldn't be able to find it. There was no definition, no import.

Later I found the explanation on how to use it at https://dart.dev/guides/language/language-tour#optional-parameters. You have to import the meta package.