fromCodec static method

DVCVariable fromCodec(
  1. Map<String, dynamic> map
)

Implementation

static DVCVariable fromCodec(Map<String, dynamic> map) {
  String mapType = map['type'].toString().toLowerCase();

  return DVCVariable(
      key: map['key'],
      value: map['value'],
      id: map['id'],
      type: VariableType.values
          .firstWhereOrNull((e) => e.toString() == "VariableType.$mapType")
  );
}