I have updated the flutter version to 1.20.2, and I have not encountered any problems, knowing that I use JsonSerializable
as well, try this:
Remove these files:
pubspec.lock
.packages
.flutter-plugins
.flutter-plugins-dependencies
then apply flutter pub get
command