GoogleAppsCardV1SelectionInput class
A widget that creates one or more UI items that users can select.
Supports form submission validation for dropdown
and multiselect
menus
only. When Action.all_widgets_are_required
is set to true
or this widget
is specified in Action.required_widgets
, the submission action is blocked
unless a value is selected. For example, a dropdown menu or checkboxes. You
can use this widget to collect data that can be predicted or enumerated. For
an example in Google Chat apps, see [Add selectable UI
elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
Chat apps can process the value of items that users select or input. For
details about working with form inputs, see
Receive form data.
To collect undefined or abstract data from users, use the TextInput widget.
[Google Workspace add-ons and Chat
apps](https://developers.google.com/workspace/extend):
Constructors
-
GoogleAppsCardV1SelectionInput.new({GoogleAppsCardV1Action? externalDataSource, List<
GoogleAppsCardV1SelectionItem> ? items, String? label, int? multiSelectMaxSelectedItems, int? multiSelectMinQueryLength, String? name, GoogleAppsCardV1Action? onChangeAction, GoogleAppsCardV1PlatformDataSource? platformDataSource, String? type}) - GoogleAppsCardV1SelectionInput.fromJson(Map json_)
Properties
- externalDataSource ↔ GoogleAppsCardV1Action?
-
An external data source, such as a relational database.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
↔ List<
GoogleAppsCardV1SelectionItem> ? -
An array of selectable items.
getter/setter pair
- label ↔ String?
-
The text that appears above the selection input field in the user
interface.
getter/setter pair
- multiSelectMaxSelectedItems ↔ int?
-
For multiselect menus, the maximum number of items that a user can select.
getter/setter pair
- multiSelectMinQueryLength ↔ int?
-
For multiselect menus, the number of text characters that a user inputs
before the menu returns suggested selection items.
getter/setter pair
- name ↔ String?
-
The name that identifies the selection input in a form input event.
getter/setter pair
- onChangeAction ↔ GoogleAppsCardV1Action?
-
If specified, the form is submitted when the selection changes.
getter/setter pair
- platformDataSource ↔ GoogleAppsCardV1PlatformDataSource?
-
A data source from Google Workspace.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String?
-
The type of items that are displayed to users in a
SelectionInput
widget.getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited