settingsItems property
List<SettingItem>
get
settingsItems
Get the list of configurable settings. Port of settingsItems array from Config.tsx.
Implementation
List<SettingItem> get settingsItems {
final query = searchQuery.value.toLowerCase();
final items = <SettingItem>[
SettingItem(
id: 'autoCompactEnabled',
label: NeomageTranslationConstants.autoCompact.tr,
type: SettingType.boolean,
value: autoCompactEnabled.value,
onChange: (v) {
autoCompactEnabled.value = v as bool;
_trackChange('Auto-compact', v);
},
),
SettingItem(
id: 'spinnerTipsEnabled',
label: NeomageTranslationConstants.showTips.tr,
type: SettingType.boolean,
value: showTips.value,
onChange: (v) {
showTips.value = v as bool;
_trackChange('Show tips', v);
},
),
SettingItem(
id: 'prefersReducedMotion',
label: NeomageTranslationConstants.reduceMotion.tr,
type: SettingType.boolean,
value: reduceMotion.value,
onChange: (v) {
reduceMotion.value = v as bool;
_trackChange('Reduce motion', v);
},
),
SettingItem(
id: 'thinkingEnabled',
label: NeomageTranslationConstants.thinkingMode.tr,
type: SettingType.boolean,
value: thinkingEnabled.value,
onChange: (v) {
thinkingEnabled.value = v as bool;
_trackChange('Thinking mode', v);
},
),
SettingItem(
id: 'verbose',
label: NeomageTranslationConstants.verboseOutput.tr,
type: SettingType.boolean,
value: verboseMode.value,
onChange: (v) {
verboseMode.value = v as bool;
_trackChange('Verbose', v);
},
),
SettingItem(
id: 'fileCheckpointing',
label: NeomageTranslationConstants.fileCheckpointing.tr,
type: SettingType.boolean,
value: fileCheckpointing.value,
onChange: (v) {
fileCheckpointing.value = v as bool;
_trackChange('File checkpointing', v);
},
),
SettingItem(
id: 'notifications',
label: NeomageTranslationConstants.notifications.tr,
type: SettingType.boolean,
value: notificationsEnabled.value,
onChange: (v) {
notificationsEnabled.value = v as bool;
_trackChange('Notifications', v);
},
),
];
if (query.isEmpty) return items;
return items
.where(
(item) =>
item.label.toLowerCase().contains(query) ||
(item.searchText?.toLowerCase().contains(query) ?? false),
)
.toList();
}