I am a newbie in flutter. I am building Post class using built-value. The class looks like
import 'package:built_value/built_value.dart';
part 'posts.g.dart';
abstract class Post implements Built<Post, PostBuilder> {
Post._();
factory Post([void Function(PostBuilder) updates]) = _$Post;
}
With pubspec.yaml
file as:
dependencies:
url_launcher: "^3.0.0"
built_value: "^7.1.0"
built_collection: "^4.3.2"
flutter:
sdk: flutter
cupertino_icons: "^0.1.3"
dev_dependencies:
build_runner: "^1.0.0"
build_test: "^0.10.3"
flutter_test:
sdk: flutter
The posts.g.dart
file is not generating on running flutter packages pub run build_runner build
.
Change the pubspec.yaml file to: