42 lines
1.4 KiB
Dart
42 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
// import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
|
|
|
class MenuWidget extends StatelessWidget {
|
|
final String text;
|
|
final IconData? icon;
|
|
final VoidCallback? onPressed;
|
|
final Color? borderColor;
|
|
|
|
const MenuWidget({super.key, required this.text, this.icon, this.onPressed, this.borderColor});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onPressed,
|
|
child: Container(
|
|
width: MediaQuery.of(context).size.width - 96,
|
|
padding: EdgeInsets.only(top: 16, bottom: 16),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(12),
|
|
border: Border.all(color: borderColor ?? const Color.fromARGB(255, 255, 255, 255), width: 2),
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
const Gap(32),
|
|
Icon(icon, size: 24, color: const Color.fromRGBO(255, 255, 255, 1)),
|
|
const Gap(64),
|
|
Text(
|
|
text,
|
|
style: GoogleFonts.outfit(
|
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500)),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|