From b5e7fe23ab335388eb8ee28fe781dc77fab3b899 Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Mon, 17 Nov 2025 13:10:08 +0100 Subject: [PATCH] changed fullwidthbutton to include size, borderColor and infillColor attributes --- .../widgets/full_width_button.dart | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/presentation/widgets/full_width_button.dart b/lib/presentation/widgets/full_width_button.dart index bd18c64..fc2ca78 100644 --- a/lib/presentation/widgets/full_width_button.dart +++ b/lib/presentation/widgets/full_width_button.dart @@ -1,10 +1,19 @@ import 'package:flutter/material.dart'; -import 'package:game_tracker/core/custom_theme.dart'; class FullWidthButton extends StatelessWidget { - const FullWidthButton({super.key, required this.text, this.onPressed}); + const FullWidthButton({ + super.key, + required this.text, + required this.borderColor, + required this.infillColor, + required this.sizeRelativeToWidth, + required this.onPressed, + }); final String text; + final Color borderColor; + final Color infillColor; + final double sizeRelativeToWidth; final VoidCallback? onPressed; @override @@ -12,8 +21,12 @@ class FullWidthButton extends StatelessWidget { return ElevatedButton( onPressed: onPressed, style: ElevatedButton.styleFrom( - minimumSize: Size(MediaQuery.sizeOf(context).width * 0.9, 60), - backgroundColor: CustomTheme.primaryColor, + minimumSize: Size( + MediaQuery.sizeOf(context).width * sizeRelativeToWidth, + 60, + ), + backgroundColor: infillColor, + side: BorderSide(color: borderColor, width: 2), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), child: Text(