fromJson static method

CubitStateEntity fromJson(
  1. Map<String, dynamic> json
)

Implementation

static CubitStateEntity fromJson(Map<String, dynamic> json) {
  final fields = <ID, Variable>{};
  if (json['fields'] != null) {
    for (final entry in json['fields'].entries) {
      fields[entry.key] = Variable.fromJson(entry.value);
    }
  }
  return CubitStateEntity(
    id: json['id'],
    name: json['name'],
    fields: fields,
  );
}