toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() => {
      "sourceType": sourceType.value,
      "fieldType": fieldType.value,
      "fieldName": fieldName,
      "light": light.value,
      "lightName": lightName,
      "pageIndex": pageIndex,
      "originalPageIndex": originalPageIndex,
      "value": _bytesToBase64(value),
      "fieldRect": fieldRect?.toJson(),
    }.clearNulls();