Component class
Component structure
- Annotations
-
- @JsonSerializable(includeIfNull: false)
Constructors
-
Component({required ComponentType type, String? customId, bool? disabled, ButtonStyle? style, String? label, Emoji? emoji, String? url, List<
SelectOption> ? options, String? placeholder, int? minValues, int? maxValues, List<Component> ? components}) - Constructor
-
Component.fromJson(Map<
String, dynamic> json) -
From json
factory
Properties
-
components
→ List<
Component> ? -
a list of child components
final
- customId → String?
-
a developer-defined identifier for the component, max 100 characters
final
- disabled → bool?
-
whether the component is disabled, default false
final
- emoji → Emoji?
-
name, id, and animated
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String?
-
text that appears on the button, max 80 characters
final
- maxValues → int?
-
the maximum number of items that can be chosen; default 1, max 25
final
- minValues → int?
-
the minimum number of items that must be chosen; default 1, min 0, max 25
final
-
options
→ List<
SelectOption> ? -
the choices in the select, max 25
final
- placeholder → String?
-
custom placeholder text if nothing is selected, max 100 characters
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → ButtonStyle?
-
one of button styles
final
- type → ComponentType
-
component type
final
- url → String?
-
a url for link-style buttons
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - To json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited