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

@ -0,0 +1,49 @@
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
class ConsultationWidget extends StatelessWidget {
final String name;
// final IconData? icon;
final VoidCallback? onTap;
final double? width;
// final String? color;
// final String description;
const ConsultationWidget({super.key, required this.name, this.onTap, this.width});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: width ?? MediaQuery.of(context).size.width - 96,
padding: const EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
// gradient: LinearGradient(
// colors: Colors.white,
// begin: Alignment.centerLeft,
// end: Alignment.centerRight,
// ),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const Gap(32),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(
text: name,
size: 18,
bold: true,
),
],
),
],
),
),
);
}
}

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),

View file

@ -4,8 +4,9 @@ class PageBackgroundWidget extends StatelessWidget {
final Widget child;
final String? page;
final double? height;
final bool? dark;
const PageBackgroundWidget({super.key, required this.child, this.page, this.height});
const PageBackgroundWidget({super.key, required this.child, this.page, this.height, this.dark});
@override
Widget build(BuildContext context) {
@ -27,14 +28,19 @@ class PageBackgroundWidget extends StatelessWidget {
),
fit: BoxFit.cover, // Ensures the background covers the entire container
alignment: Alignment.center,
opacity: 0.3, // Adjusts the opacity as needed
opacity: dark == true ? 0.1 : 0.3, // Adjusts the opacity as needed
),
gradient: const RadialGradient(
gradient: RadialGradient(
tileMode: TileMode.clamp,
colors: [
Color.fromRGBO(26, 8, 25, 1),
Color.fromRGBO(60, 22, 57, 1),
],
colors: dark == true
? [
Color.fromRGBO(19, 8, 26, 1),
Color.fromRGBO(43, 22, 60, 1),
]
: [
Color.fromRGBO(26, 8, 25, 1),
Color.fromRGBO(60, 22, 57, 1),
],
),
),
child: Center(