toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson () {
  return {
    'type': ComponentType.textInput.value,
    'custom_id': customId,
    'style': style.value,
    'label': label,
    'min_length': minLength ?? 1,
    'max_length': maxLength ?? 4000,
    'required': required,
    'value': value,
    'placeholder': placeholder,
  };
}