toJson method
Implementation
Map<String, dynamic> toJson() {
final key = this.key;
final name = this.name;
final required = this.required;
final secret = this.secret;
final description = this.description;
final queryable = this.queryable;
final type = this.type;
return {
'key': key,
'name': name,
'required': required,
'secret': secret,
if (description != null) 'description': description,
if (queryable != null) 'queryable': queryable,
if (type != null) 'type': type.toValue(),
};
}