update
This commit is contained in:
parent
3e6781a0bd
commit
5469c484e1
10 changed files with 204 additions and 48 deletions
|
|
@ -1,33 +1,40 @@
|
|||
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 String text;
|
||||
final IconData? icon;
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
const MenuWidget({
|
||||
super.key,
|
||||
this.text,
|
||||
required this.text,
|
||||
this.icon,
|
||||
this.onPressed,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width - 32,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [
|
||||
const Gap(32),
|
||||
Icon(icon, size: 32, color: const Color.fromRGBO(34, 51, 69, 1)),
|
||||
const Gap(120),
|
||||
Text(
|
||||
text ?? 'Data',
|
||||
style: TextStyle(fontSize: 16),
|
||||
)
|
||||
]));
|
||||
return GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width - 64,
|
||||
height: 80,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [
|
||||
const Gap(32),
|
||||
Icon(icon, size: 32, color: const Color.fromRGBO(34, 51, 69, 1)),
|
||||
const Gap(64),
|
||||
Text(
|
||||
text,
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 20)),
|
||||
),
|
||||
])),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue