toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': type,
    'payload': payload.toJson(),
    if (thumbnail != null) 'thumbnail': thumbnail,
    if (width != null) 'width': width,
    if (height != null) 'height': height,
    if (duration != null) 'duration': duration,
  };
}