LineBaseDto.fromJson constructor

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

Implementation

factory LineBaseDto.fromJson(Map<String, dynamic> json) {
  switch (decodeLineType(LineTypeEnumMap, json["type"] as String)) {
    case LineType.Default:
      return DefaultLineDto.fromJson(json);
    case LineType.text:
      return TextLineDto.fromJson(json);
    case LineType.discount:
      return DiscountLineDto.fromJson(json);
    case LineType.keyValue:
      return KeyValueLineDto.fromJson(json);
  }
}