From db51990695d60144175ea136cb62dfafd17002f6 Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Tue, 13 Jan 2026 22:17:38 +0100 Subject: [PATCH] Revert "add background color option to AnimatedDialogButton" This reverts commit 4019ed083ff75e6abecffcf6e9a2247f64a69401. --- .../main_menu/settings_view/settings_view.dart | 3 +-- .../widgets/buttons/animated_dialog_button.dart | 17 ++++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/presentation/views/main_menu/settings_view/settings_view.dart b/lib/presentation/views/main_menu/settings_view/settings_view.dart index 34381c4..1304f4a 100644 --- a/lib/presentation/views/main_menu/settings_view/settings_view.dart +++ b/lib/presentation/views/main_menu/settings_view/settings_view.dart @@ -111,8 +111,7 @@ class _SettingsViewState extends State { ), AnimatedDialogButton( onPressed: () => Navigator.of(context).pop(true), - child: Text(loc.delete, style: TextStyle(color: CustomTheme.textColor)), - backgroundColor: CustomTheme.secondaryColor, + child: Text(loc.delete, style: TextStyle(color: CustomTheme.secondaryColor)), ), ], ), diff --git a/lib/presentation/widgets/buttons/animated_dialog_button.dart b/lib/presentation/widgets/buttons/animated_dialog_button.dart index a93f7cf..c0ce560 100644 --- a/lib/presentation/widgets/buttons/animated_dialog_button.dart +++ b/lib/presentation/widgets/buttons/animated_dialog_button.dart @@ -8,18 +8,13 @@ import 'package:game_tracker/core/custom_theme.dart'; /// Parameters: /// - [onPressed]: Callback function that is triggered when the button is pressed. /// - [child]: The child widget to be displayed inside the button, typically a text or icon. -/// - [backgroundColor]: Optional background color for the button container. If null, uses the standard box color from CustomTheme. class AnimatedDialogButton extends StatefulWidget { - const AnimatedDialogButton({ - super.key, - required this.onPressed, - required this.child, - this.backgroundColor, - }); + const AnimatedDialogButton({super.key, required this.onPressed, required this.child}); + /// Callback function that is triggered when the button is pressed. final VoidCallback onPressed; + /// The child widget to be displayed inside the button, typically a text or icon. final Widget child; - final Color? backgroundColor; @override State createState() => _AnimatedDialogButtonState(); @@ -42,11 +37,7 @@ class _AnimatedDialogButtonState extends State { opacity: _isPressed ? 0.6 : 1.0, duration: const Duration(milliseconds: 100), child: Container( - decoration: widget.backgroundColor != null - ? CustomTheme.standardBoxDecoration.copyWith( - color: widget.backgroundColor, - ) - : CustomTheme.standardBoxDecoration, + decoration: CustomTheme.standardBoxDecoration, padding: const EdgeInsets.symmetric(horizontal: 26, vertical: 6), child: widget.child, ),