themed-file-picker
Use ThemedFilePicker in a layrz Flutter widget. Apply when adding a file upload field that opens a system file picker and returns base64 + raw bytes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use ThemedFilePicker in a layrz Flutter widget. Apply when adding a file upload field that opens a system file picker and returns base64 + raw bytes.
用 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-file-picker |
| description | Use ThemedFilePicker in a layrz Flutter widget. Apply when adding a file upload field that opens a system file picker and returns base64 + raw bytes. |
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.
For image-only avatar/photo upload → use ThemedAvatarPicker.
ThemedFilePicker(
labelText: context.i18n.t('entity.file'),
value: fileName,
errors: context.getErrors(key: 'file'),
onChanged: (base64, bytes) {
fileBase64 = base64;
fileBytes = bytes;
if (context.mounted) onChanged.call();
},
)
ThemedTextInput showing the selected filename (read-only).onChanged fires with (String base64, List<int> bytes) — base64 is a "data:<mimeType>;base64,<data>" string.onChanged("", []).acceptedTypes controls which file types the picker shows (default: FileType.any).allowedExtensions works only when acceptedTypes == FileType.custom.customChild wraps any widget in an InkWell that opens the picker.label / labelText must be set — assert enforced.// Images only
ThemedFilePicker(
labelText: context.i18n.t('entity.image'),
value: fileName,
acceptedTypes: FileType.image,
onChanged: (base64, bytes) {
fileBase64 = base64;
if (context.mounted) onChanged.call();
},
)
// Custom extensions (e.g. CSV only)
ThemedFilePicker(
labelText: context.i18n.t('entity.csvFile'),
value: fileName,
acceptedTypes: FileType.custom,
allowedExtensions: ['csv'],
onChanged: (base64, bytes) {
csvBase64 = base64;
csvBytes = bytes;
if (context.mounted) onChanged.call();
},
)
// Required field
ThemedFilePicker(
labelText: context.i18n.t('entity.document'),
value: fileName,
isRequired: true,
errors: context.getErrors(key: 'document'),
onChanged: (base64, bytes) {
documentBase64 = base64;
if (context.mounted) onChanged.call();
},
)
// Disabled
ThemedFilePicker(
labelText: context.i18n.t('entity.file'),
value: fileName,
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).