WFormMultiDropdown class
表单多选下拉框组件
点击后在锚点下方弹出可多选的选项列表,字段值为 Set<String>;
未选择时的占位文本、禁用项、弹层外观与选项样式可通过
WFormMultiDropdownConfig 配置,只读状态会合并外层 WFormReadOnlyScope。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- WFormMultiDropdown
- Available extensions
Constructors
-
WFormMultiDropdown({Key? key, required WFormMultiDropdownConfig config, required String name, required Map<
String, String> items, Set<String> ? initialValue, ValueChanged<Set< ? onChanged, FormFieldValidator<String> >Set< ? validator, String? hintText, double? width, bool? enabled})String> > -
创建多选下拉框组件
const
Properties
- config → WFormMultiDropdownConfig
-
多选下拉框配置
final
- enabled → bool?
-
是否启用(null 时使用 config.enabled)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → String?
-
未选择时的展示文本(null 时使用 config.hintText,仍未配置则显示
ALL)final -
initialValue
→ Set<
String> ? -
初始值
final
-
items
→ Map<
String, String> -
选项映射,键为值,值为显示文本
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- name → String
-
字段名称
final
-
notificationListenerBuilder
→ WNotificationListenerBuilder<
Notification> -
Available on Widget, provided by the WNotificationListenerBuilderExtension extension
创建 WNotificationListenerBuilder 实例no setter -
onChanged
→ ValueChanged<
Set< ?String> > -
值变化回调(空集合表示未选择)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validator
→ FormFieldValidator<
Set< ?String> > -
校验器
final
- width → double?
-
宽度(null 时使用 config.width)
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
expanded(
[int flex = 1]) → Widget -
Available on Widget, provided by the WWidgetExtension extension
将 Widget 包装在 Expanded 中 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toButton(
{GestureTapCallback? onTap, GestureLongPressCallback? onLongPress, WButtonConfig? config}) → Widget -
Available on Widget, provided by the WUiWidgetExtension extension
将 Widget 包装在 WButton 中 -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
withBottomPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加底部 padding -
withBottomSafeSpace(
) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加底部安全空间(适配底部导航栏) -
withBottomSpace(
double height) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加自定义底部空间 -
withContainer(
WContainerConfig config) → Widget -
Available on Widget, provided by the WUiWidgetExtension extension
将 Widget 包装在 Container 中 -
withHorizontalPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加水平 padding -
withLeftPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加左侧 padding -
withRightPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加右侧 padding -
withTopPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加顶部 padding -
withTopSafeSpace(
) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加顶部安全空间(适配状态栏) -
withVerticalPadding(
double padding) → Widget -
Available on Widget, provided by the WWidgetExtension extension
添加垂直 padding
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited