fromJson static method

ModelEntity fromJson(
  1. Map<String, dynamic> json,
  2. ActionMapper actionMapper
)

Implementation

static ModelEntity fromJson(
    Map<String, dynamic> json, ActionMapper actionMapper) {
  return ModelEntity(
    id: json['id'],
    name: json['name'],
    description: json['description'],
    fields: (json['fields'] as List<dynamic>? ?? [])
        .map((e) => ModelFieldEntity.fromJson(e))
        .toList(),
    methods: (json['methods'] as List<dynamic>? ?? [])
        .map((e) => WorkflowEntity.fromJson(e, actionMapper))
        .toList(),
  );
}