From 991b2c69f72442748d2a9ae42e54d5397be2da10 Mon Sep 17 00:00:00 2001 From: Udhay-Adithya Date: Sat, 27 Sep 2025 15:01:51 +0530 Subject: [PATCH] feat: enhance DashbotApplyCurlButton to highlight destructive actions with error color --- .../dashbot_apply_curl_button.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/dashbot/core/common/widgets/dashbot_action_buttons/dashbot_apply_curl_button.dart b/lib/dashbot/core/common/widgets/dashbot_action_buttons/dashbot_apply_curl_button.dart index dfa3e911..38ef5b4b 100644 --- a/lib/dashbot/core/common/widgets/dashbot_action_buttons/dashbot_apply_curl_button.dart +++ b/lib/dashbot/core/common/widgets/dashbot_action_buttons/dashbot_apply_curl_button.dart @@ -26,11 +26,18 @@ class DashbotApplyCurlButton extends ConsumerWidget with DashbotActionMixin { @override Widget build(BuildContext context, WidgetRef ref) { final label = _labelForField(action.field, action.path); + final isDestructive = action.field == 'apply_to_selected'; return ElevatedButton( onPressed: () async { await ref.read(chatViewmodelProvider.notifier).applyAutoFix(action); }, - child: Text(label), + child: Text( + label, + // Destructive action: highlight with error color + style: isDestructive + ? TextStyle(color: Theme.of(context).colorScheme.error) + : null, + ), ); } }