From 95f02ddb91764e6eac3e5dba1dee19ac63c68068 Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Wed, 19 Nov 2025 16:41:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/select_equalizer_widget.dart | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/lib/modules/eq_settings/views/widgets/select_equalizer_widget.dart b/lib/modules/eq_settings/views/widgets/select_equalizer_widget.dart index c9c364d62..3ff4abeaf 100644 --- a/lib/modules/eq_settings/views/widgets/select_equalizer_widget.dart +++ b/lib/modules/eq_settings/views/widgets/select_equalizer_widget.dart @@ -53,6 +53,62 @@ class _SelectEqualizerWidgetState extends State { // 构建主体内容 Widget _buildBody(bool isDarkMode) { - return Container(); + return ListView( + padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.w), + children: [ + Wrap( + spacing: 10.w, + runSpacing: 10.w, + children: _templateData['options'].map((Map option) { + return _item(isDarkMode, option); + }).toList(), + ), + ], + ); + } + + Widget _item(bool isDarkMode, Map option) { + return GestureDetector( + onTap: () { + Get.back(result: { + 'label': option['label'], + 'value': option['value'], + }); + }, + child: Container( + width: 110.w, + height: 110.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: _templateData['value'] == option['value'] + ? Colors.green + : isDarkMode + ? Colors.white.withValues(alpha: 0.05) + : Colors.white, + borderRadius: BorderRadius.circular(8.w), + boxShadow: [ + BoxShadow( + color: isDarkMode + ? Colors.black.withValues(alpha: 0.2) + : Colors.black.withValues(alpha: 0.05), + blurRadius: 10, + offset: const Offset(0, 4), + ), + ], + ), + child: Text( + option['label'], + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.w600, + color: _templateData['value'] == option['value'] + ? Colors.white + : isDarkMode + ? Colors.white + : Colors.black, + ), + ), + ), + ); } }