toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  switch (type) {
    case CustomSectionDataTypeDto.text:
      return (this as TextCustomSectionDataDto).toJson();
    case CustomSectionDataTypeDto.keyValue:
      return (this as KeyValueCustomSectionDataDto).toJson();
    case CustomSectionDataTypeDto.barcode:
      return (this as BarcodeCustomSectionDataDto).toJson();
    case CustomSectionDataTypeDto.qrCode:
      return (this as QrCodeCustomSectionDataDto).toJson();
  }
}