themed-text-input
Use ThemedTextInput in a layrz Flutter widget. Apply when adding any free-text field, multiline textarea, or combobox autocomplete to a form or view.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use ThemedTextInput in a layrz Flutter widget. Apply when adding any free-text field, multiline textarea, or combobox autocomplete to a form or view.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
| name | themed-text-input |
| description | Use ThemedTextInput in a layrz Flutter widget. Apply when adding any free-text field, multiline textarea, or combobox autocomplete to a form or view. |
Dart syntax: This library requires Dart ≥ 3.10. Use dot shorthand for all enum values (e.g.
.col6,.start,.left) — never write the fully-qualified form (Sizes.col6,WrapAlignment.start).
Full constructor and property reference: read
references/api.mdin this skill's directory.
maxLines > 1)enableCombobox: true)For passwords → use ThemedPasswordInput. For search bars → use ThemedSearchInput.
Never use raw TextField or TextFormField.
ThemedTextInput(
labelText: context.i18n.t('entity.name'),
value: name,
errors: context.getErrors(key: 'name'),
onChanged: (value) {
name = value;
if (context.mounted) onChanged.call();
},
)
label / labelText must be set — assert enforced.disabled: true → appends LayrzIcons.solarOutlineLockKeyhole as suffix automatically. Do not add your own.value syncs to the internal TextEditingController on didUpdateWidget (only when no external controller provided).validator gates onChanged — if provided, onChanged fires only when validator returns true.enableCombobox: true → opens OverlayEntry on tap, overrides onTap. Reacts to live choices updates.maxLines > 1 forces floatingLabelBehavior: always.prefixIcon/prefixWidget are mutually exclusive. Same for suffixIcon/suffixWidget.// Multiline textarea
ThemedTextInput(
labelText: context.i18n.t('entity.description'),
value: description,
maxLines: 5,
errors: context.getErrors(key: 'description'),
onChanged: (value) {
description = value;
if (context.mounted) onChanged.call();
},
)
// Combobox autocomplete
ThemedTextInput(
labelText: context.i18n.t('entity.city'),
value: city,
enableCombobox: true,
choices: citySuggestions,
errors: context.getErrors(key: 'city'),
onChanged: (value) {
city = value;
if (context.mounted) onChanged.call();
},
)
// Prefix + suffix icons
ThemedTextInput(
labelText: context.i18n.t('entity.url'),
value: url,
prefixIcon: LayrzIcons.solarOutlineLink,
suffixIcon: LayrzIcons.solarOutlineCopy,
onSuffixTap: () => Clipboard.setData(ClipboardData(text: url)),
errors: context.getErrors(key: 'url'),
onChanged: (value) {
url = value;
if (context.mounted) onChanged.call();
},
)
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).