style: add curly braces to if/else statements in settings_page
Fix curly_braces_in_flow_control_structures lint warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,16 +67,31 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||||||
final configService = AppConfigService();
|
final configService = AppConfigService();
|
||||||
final config = await configService.loadConfig();
|
final config = await configService.loadConfig();
|
||||||
config['api_url'] = url;
|
config['api_url'] = url;
|
||||||
if (_successPath != null) config['sound_success'] = _successPath;
|
if (_successPath != null) {
|
||||||
else config.remove('sound_success');
|
config['sound_success'] = _successPath;
|
||||||
if (_failurePath != null) config['sound_failure'] = _failurePath;
|
} else {
|
||||||
else config.remove('sound_failure');
|
config.remove('sound_success');
|
||||||
if (_beepPath != null) config['sound_beep'] = _beepPath;
|
}
|
||||||
else config.remove('sound_beep');
|
if (_failurePath != null) {
|
||||||
if (_errorPath != null) config['sound_error'] = _errorPath;
|
config['sound_failure'] = _failurePath;
|
||||||
else config.remove('sound_error');
|
} else {
|
||||||
if (_alertPath != null) config['sound_alert'] = _alertPath;
|
config.remove('sound_failure');
|
||||||
else config.remove('sound_alert');
|
}
|
||||||
|
if (_beepPath != null) {
|
||||||
|
config['sound_beep'] = _beepPath;
|
||||||
|
} else {
|
||||||
|
config.remove('sound_beep');
|
||||||
|
}
|
||||||
|
if (_errorPath != null) {
|
||||||
|
config['sound_error'] = _errorPath;
|
||||||
|
} else {
|
||||||
|
config.remove('sound_error');
|
||||||
|
}
|
||||||
|
if (_alertPath != null) {
|
||||||
|
config['sound_alert'] = _alertPath;
|
||||||
|
} else {
|
||||||
|
config.remove('sound_alert');
|
||||||
|
}
|
||||||
await configService.saveConfig(config);
|
await configService.saveConfig(config);
|
||||||
setState(() => _saving = false);
|
setState(() => _saving = false);
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user