themed-select-input
Use ThemedSelectInput in a layrz Flutter widget. Apply when adding a single-value picker field that opens a searchable dialog list.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use ThemedSelectInput in a layrz Flutter widget. Apply when adding a single-value picker field that opens a searchable dialog list.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | themed-select-input |
| description | Use ThemedSelectInput in a layrz Flutter widget. Apply when adding a single-value picker field that opens a searchable dialog list. |
Dart syntax: This library requires Dart ≥ 3.10. Use dot shorthand for all enum values — never write the fully-qualified form.
Full constructor and property reference: read
references/api.mdin this skill's directory.
T?DropdownButton — always use this widget.For multiple-value selection → use ThemedMultiSelectInput. For two-panel Available/Selected layout → use ThemedDualListInput.
ThemedSelectInput<String>(
labelText: context.i18n.t('entity.status'),
items: statuses.map((s) => ThemedSelectItem(value: s.id, label: s.name)).toList(),
value: selectedStatus,
errors: context.getErrors(key: 'status'),
onChanged: (item) {
selectedStatus = item?.value;
if (context.mounted) onChanged.call();
},
)
onChanged receives ThemedSelectItem<T>?. Always use .value to extract the raw T.
autoclose: true — dialog closes immediately on item tap (no Save button needed).canUnselect: true lets the user tap the current selection to deselect it; pair with autoclose: false.returnNullOnClose: true calls onChanged(null) when dialog is dismissed without picking.autoSelectFirst: true auto-selects items[0] on init when value is null.customChild wraps any widget in an InkWell that opens the dialog.label / labelText must be set — assert enforced.dialogContraints (missing 's') — not dialogConstraints.// Allow deselection
ThemedSelectInput<String>(
labelText: context.i18n.t('entity.category'),
items: categories.map((c) => ThemedSelectItem(value: c.id, label: c.name)).toList(),
value: selectedCategory,
canUnselect: true,
autoclose: false,
errors: context.getErrors(key: 'category'),
onChanged: (item) {
selectedCategory = item?.value;
if (context.mounted) onChanged.call();
},
)
// Clear on dialog dismiss
ThemedSelectInput<String>(
labelText: context.i18n.t('entity.filter'),
items: filters,
value: selectedFilter,
returnNullOnClose: true,
onChanged: (item) {
selectedFilter = item?.value;
if (context.mounted) onChanged.call();
},
)
// Disabled
ThemedSelectInput<String>(
labelText: context.i18n.t('entity.status'),
items: statuses,
value: selectedStatus,
disabled: true,
)
onChanged with if (context.mounted) before calling the parent callback.context.i18n.t('entity.fieldName') for labelText — never hardcode strings.errors: context.getErrors(key: 'fieldName').const SizedBox(height: 10).Use ThemedTabView and ThemedTab in a layrz Flutter widget. Apply when adding horizontal tab navigation with Material 3 styling.
Use ThemedButton in a layrz Flutter widget. Apply when rendering any tappable action — primary/secondary CTAs, icon-only FABs, destructive actions, cooldown buttons, or the six semantic factories (.save, .cancel, .info, .show, .edit, .delete).
Use ThemedSearchInput in a layrz Flutter widget. Apply when adding a search bar — either a compact icon button that expands into an overlay, or a full-width inline field.
Use when migrating ThemedTable<T> (v1) to ThemedTable2<T> (v2) in a layrz Flutter widget. Apply when a widget uses the old ThemedTable API with onShow/onEdit/onDelete/onMultiDelete/ThemedColumn and needs to be updated.
Use ResponsiveCol in a layrz Flutter widget. Apply when defining a column's width at different breakpoints inside a ResponsiveRow.
Use ResponsiveRow in a layrz Flutter widget. Apply when wrapping ResponsiveCol children in a responsive 12-column grid container.