toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};

  json['type'] = type;

  if (description != null) {
    json['description'] = description;
  }

  if (helpLink != null) {
    json['help_link'] = helpLink;
  }

  if (handled != null) {
    json['handled'] = handled;
  }

  if (_meta?.isNotEmpty ?? false) {
    json['meta'] = _meta;
  }

  if (_data?.isNotEmpty ?? false) {
    json['data'] = _data;
  }

  if (synthetic != null) {
    json['synthetic'] = synthetic;
  }

  return json;
}