update
This commit is contained in:
parent
3e6781a0bd
commit
5469c484e1
10 changed files with 204 additions and 48 deletions
30
lib/widgets/button_widget.dart
Normal file
30
lib/widgets/button_widget.dart
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
// import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class ButtonWidget extends StatelessWidget {
|
||||
final String text;
|
||||
final VoidCallback onPressed;
|
||||
|
||||
const ButtonWidget({super.key, required this.text, required this.onPressed});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.white, // text color
|
||||
backgroundColor: const Color.fromARGB(255, 54, 140, 136), // background color
|
||||
side: const BorderSide(color: Color.fromARGB(55, 255, 255, 255)), // border color
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(26), // rounded corners
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width - 64, 40), // minimum size
|
||||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16), // padding
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Text(
|
||||
text,
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 18)),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -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)),
|
||||
),
|
||||
])),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
lib/widgets/text_widget.dart
Normal file
14
lib/widgets/text_widget.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class TextWidget extends StatelessWidget {
|
||||
final String text;
|
||||
|
||||
const TextWidget({super.key, required this.text});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(text,
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32)));
|
||||
}
|
||||
}
|
||||
21
lib/widgets/title_widget.dart
Normal file
21
lib/widgets/title_widget.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class TitleWidget extends StatelessWidget {
|
||||
final double firstTextSize;
|
||||
final double secondTextSize;
|
||||
|
||||
const TitleWidget({super.key, required this.firstTextSize, required this.secondTextSize});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(children: [
|
||||
Text('Ofelia Franco-Alcala',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: firstTextSize))),
|
||||
Text('Pharmacy',
|
||||
style: GoogleFonts.outfit(
|
||||
textStyle: TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: secondTextSize))),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue