SchemaTypes<T>.fromJson constructor

SchemaTypes<T>.fromJson(
  1. Map json,
  2. T factory(
    1. Map json
    )
)

Implementation

factory SchemaTypes.fromJson(Map json, T Function(Map json) factory) {
  return SchemaTypes(
    model: json['model'] == null
        ? []
        : (json['model'] as Iterable).cast<Map>().map(factory).toList(),
    prisma: json['prisma'] == null
        ? []
        : (json['prisma'] as Iterable).cast<Map>().map(factory).toList(),
  );
}