themed-checkbox-input
Use ThemedCheckboxInput in a layrz Flutter widget. Apply when adding a boolean toggle — supports checkbox, switch, and field (dropdown) styles.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use ThemedCheckboxInput in a layrz Flutter widget. Apply when adding a boolean toggle — supports checkbox, switch, and field (dropdown) styles.
用 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-checkbox-input |
| description | Use ThemedCheckboxInput in a layrz Flutter widget. Apply when adding a boolean toggle — supports checkbox, switch, and field (dropdown) styles. |
Dart syntax: This library requires Dart ≥ 3.10. Use dot shorthand for all enum values (e.g.
.asSwitch,.asFlutterCheckbox) — never write the fully-qualified form (ThemedCheckboxInputStyle.asSwitch).
Full constructor and property reference: read
references/api.mdin this skill's directory.
.asFlutterCheckbox (default) or .asCheckbox2.asSwitch.asFieldNever use raw Checkbox, Switch, or SwitchListTile — always use this widget for boolean inputs.
ThemedCheckboxInput(
labelText: context.i18n.t('entity.isActive'),
value: isActive,
errors: context.getErrors(key: 'isActive'),
onChanged: (value) {
isActive = value;
if (context.mounted) onChanged.call();
},
)
.asFlutterCheckbox — standard Flutter Checkbox widget..asCheckbox2 uses the custom ThemedAnimatedCheckbox (newer design)..asSwitch renders a Material Switch with the label to the right..asField delegates to ThemedSelectInput<bool> with Yes/No options — uses i18n keys helpers.true / helpers.false.value syncs to internal state on didUpdateWidget.label / labelText must be set — assert enforced (both null is allowed).// Switch style
ThemedCheckboxInput(
labelText: context.i18n.t('entity.notifications'),
value: notificationsEnabled,
style: .asSwitch,
errors: context.getErrors(key: 'notifications'),
onChanged: (value) {
notificationsEnabled = value;
if (context.mounted) onChanged.call();
},
)
// New design checkbox
ThemedCheckboxInput(
labelText: context.i18n.t('entity.acceptTerms'),
value: acceptTerms,
style: .asCheckbox2,
onChanged: (value) {
acceptTerms = value;
if (context.mounted) onChanged.call();
},
)
// Dropdown field style (shows Yes/No picker)
ThemedCheckboxInput(
labelText: context.i18n.t('entity.isPublic'),
value: isPublic,
style: .asField,
errors: context.getErrors(key: 'isPublic'),
onChanged: (value) {
isPublic = value;
if (context.mounted) onChanged.call();
},
)
// Disabled
ThemedCheckboxInput(
labelText: context.i18n.t('entity.isVerified'),
value: isVerified,
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).