update
This commit is contained in:
parent
5164d55905
commit
6f54a6f9fc
65 changed files with 313 additions and 137 deletions
|
|
@ -5,8 +5,9 @@ class ButtonWidget extends StatelessWidget {
|
|||
final String text;
|
||||
final VoidCallback onPressed;
|
||||
final bool? outline;
|
||||
final double? width;
|
||||
|
||||
const ButtonWidget({super.key, required this.text, required this.onPressed, this.outline});
|
||||
const ButtonWidget({super.key, required this.text, required this.onPressed, this.outline, this.width});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -30,8 +31,10 @@ class ButtonWidget extends StatelessWidget {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20), // rounded corners
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320,
|
||||
44), // minimum size
|
||||
minimumSize: Size(
|
||||
width ?? (MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320),
|
||||
44),
|
||||
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue