buil_runner build code example
Example 1: flutter build_runner
flutter pub run build_runner build
Example 2: build_runner not generating g.dart files
import 'package:json_annotation/json_annotation.dart';
part 'cache-item.g.dart';
()
class CacheItem {
int created;
String keywords;
String response;
CacheItem({this.response});
factory CacheItem.fromJson(Map<String,dynamic> json) => _$CacheItemFromJson(json);
Map<String,dynamic> toJson() => _$CacheItemToJson(this);
}