toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts a PaidMediaPreview object to JSON.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': type.value,
    'width': width,
    'height': height,
    'duration': duration,
  }..removeWhere(_nullFilter);
}