toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final _json = <String, dynamic>{};
  _json[r'type'] = type;
  if (data != null) {
    _json[r'data'] = data;
  }
  return _json;
}