toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  switch (type) {
    case LineType.Default:
      return (this as DefaultLineDto).toJson();
    case LineType.text:
      return (this as TextLineDto).toJson();
    case LineType.discount:
      return (this as DiscountLineDto).toJson();
    case LineType.keyValue:
      return (this as KeyValueLineDto).toJson();
  }
}