How to use @required annotation on Flutter constructor parameters?
Annotations need to be imported Adding at the top of your file import ‘package:flutter/foundation.dart’; should fix it. Annotations the DartAnalyzer understands are provided by the meta package. To make it easier for Flutter developers, the Flutter team decided to add the meta package to the Flutter SDK and re-export it in flutter/foundation.dart. The annotations by … Read more