toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() =>
    {
      "type": type.value,
      "status": status.value,
      "pageIndex": pageIndex,
      "typeName": typeName,
      "elements": elements.map((e) => e.toJson()).toList(),
    }.clearNulls();