toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{
    'name': name,
    'arguments': arguments.map((arg) => arg.toJson()).toList(),
  };
  if (title != null) json['title'] = title!;
  if (description != null) json['description'] = description!;
  if (icons != null) json['icons'] = icons!;
  if (meta != null) json['_meta'] = meta!;
  if (metadata != null) json['metadata'] = metadata!;
  return json;
}