diff --git a/lib/presentation/widgets/dialog/animated_dialog_button.dart b/lib/presentation/widgets/dialog/animated_dialog_button.dart index 624d20a..70deea6 100644 --- a/lib/presentation/widgets/dialog/animated_dialog_button.dart +++ b/lib/presentation/widgets/dialog/animated_dialog_button.dart @@ -7,22 +7,23 @@ class AnimatedDialogButton extends StatefulWidget { /// - [onPressed]: Callback function that is triggered when the button is pressed. /// - [buttonText]: The text to be displayed on the button. /// - [buttonType]: The type of the button, which determines its styling. + /// - [buttonConstraints]: Optional constraints to control the button's size. const AnimatedDialogButton({ super.key, - required this.onPressed, required this.buttonText, - this.constraints, + required this.onPressed, + this.buttonConstraints, this.buttonType = ButtonType.primary, }); - final BoxConstraints? constraints; - - final ButtonType buttonType; - final String buttonText; final VoidCallback onPressed; + final BoxConstraints? buttonConstraints; + + final ButtonType buttonType; + @override State createState() => _AnimatedDialogButtonState(); } @@ -68,7 +69,7 @@ class _AnimatedDialogButtonState extends State { duration: const Duration(milliseconds: 100), child: Center( child: Container( - constraints: widget.constraints, + constraints: widget.buttonConstraints, decoration: buttonDecoration, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), margin: const EdgeInsets.symmetric(vertical: 8), diff --git a/lib/presentation/widgets/dialog/custom_dialog_action.dart b/lib/presentation/widgets/dialog/custom_dialog_action.dart index 2882c76..9718a03 100644 --- a/lib/presentation/widgets/dialog/custom_dialog_action.dart +++ b/lib/presentation/widgets/dialog/custom_dialog_action.dart @@ -26,7 +26,7 @@ class CustomDialogAction extends StatelessWidget { onPressed: onPressed, buttonText: text, buttonType: buttonType, - constraints: const BoxConstraints(minWidth: 300), + buttonConstraints: const BoxConstraints(minWidth: 300), ); } }