TypeReference.fromJson constructor

TypeReference.fromJson(
  1. Map json
)

Implementation

factory TypeReference.fromJson(Map json) {
  return TypeReference(
    type: json['type'],
    isList: json['isList'],
    location: TypeLocation.values.firstWhere(
      (e) => e.name == json['location'],
    ),
    namespace: TypeNamespace.values
        .where((e) => e.name == json['namespace'])
        .firstOrNull,
  );
}