From f6bfd8cb10410c3a4ad793a96b7896e4a57fe104 Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Fri, 22 May 2026 09:58:42 +0800 Subject: [PATCH] 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 --- lib/pages/settings_page.dart | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index 44fdd80..95f8359 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -67,16 +67,31 @@ class _SettingsPageState extends State { final configService = AppConfigService(); final config = await configService.loadConfig(); config['api_url'] = url; - if (_successPath != null) config['sound_success'] = _successPath; - else config.remove('sound_success'); - if (_failurePath != null) config['sound_failure'] = _failurePath; - else config.remove('sound_failure'); - 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'); + if (_successPath != null) { + config['sound_success'] = _successPath; + } else { + config.remove('sound_success'); + } + if (_failurePath != null) { + config['sound_failure'] = _failurePath; + } else { + config.remove('sound_failure'); + } + 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); setState(() => _saving = false); if (mounted) {