InterfaceType is not a subtype of Class in VariableGet InterfaceType is not a subtype of Class in VariableGet dart dart

InterfaceType is not a subtype of Class in VariableGet


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


First, you have to remove the following files from your code:

pubspec.lock

.packages

.flutter-plugins

.flutter-plugins-dependencies

and then you have to apply the flutter pub get command.


supported data types of json_serializer are:

  1. string.
  2. number.
  3. boolean.
  4. null.
  5. object.
  6. array.

so please reflector your data class