toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'type': type.name,
      if (collection != null) 'collection': collection,
      if (recordId != null) 'recordId': recordId,
      if (data != null) 'data': data,
      if (timestamp != null) 'timestamp': timestamp!.toIso8601String(),
      if (metadata != null) 'metadata': metadata,
    };