toMap method

  1. @override
Map<String, Object?> toMap()
override

Converts this PromptArgument into a JSON-compatible map.

Implementation

@override
Map<String, Object?> toMap() {
  return {
    'name': name,
    if (title != null) 'title': title,
    if (description != null) 'description': description,
    if (required != null) 'required': required,
  };
}