fromJson static method

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

Implementation

static MethodEntity fromJson(
    Map<String, dynamic> json, ActionMapper actionMapper) {
  return MethodEntity(
    id: json['id'],
    type: EnumToString.fromString(MethodTypes.values, json['type'])!,
    actions: (json['actions'] as List<dynamic>)
        .map((e) => ActionEntity.fromJson(e, actionMapper))
        .toList(),
  );
}