updatePreset method
- ViewPreset preset
inherited
Replaces the given preset with the current state using toPreset
.
Implementation
Future<void> updatePreset(ViewPreset preset) async {
final index = presets.indexOf(preset);
presets[index] = toPreset(preset.name);
await models.settings.update();
}