This commit is contained in:
Patrick Alvin Alcala 2025-02-26 18:00:41 +08:00
parent 9d5a392db3
commit c41c19b469
10 changed files with 299 additions and 181 deletions

View file

@ -9,6 +9,7 @@ class MenuWidget extends StatelessWidget {
final VoidCallback? onPressed;
final String? color;
final String description;
final double? width;
final List<Color> blue = [
const Color.fromRGBO(59, 101, 156, 0.8),
@ -34,14 +35,14 @@ class MenuWidget extends StatelessWidget {
const Color.fromRGBO(104, 156, 59, 0.8),
];
MenuWidget({super.key, required this.text, required this.description, this.icon, this.onPressed, this.color});
MenuWidget({super.key, required this.text, required this.description, this.icon, this.onPressed, this.color, this.width});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onPressed,
child: Container(
width: MediaQuery.of(context).size.width - 96,
width: width ?? MediaQuery.of(context).size.width - 96,
padding: const EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),