This commit is contained in:
Patrick Alvin Alcala 2025-02-26 15:23:42 +08:00
parent 06b853b2ca
commit 9d5a392db3
9 changed files with 206 additions and 156 deletions

View file

@ -3,6 +3,7 @@ import 'package:go_router/go_router.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/button_widget.dart';
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
import 'package:pharmacy_mobile/widgets/pull_refresh_widget.dart';
import 'package:pharmacy_mobile/widgets/slogan_widget.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
import 'package:pharmacy_mobile/widgets/title_widget.dart';
@ -22,41 +23,43 @@ class IndexPage extends StatelessWidget {
return Scaffold(
resizeToAvoidBottomInset: false,
body: PageBackgroundWidget(
child: Column(
children: [
const Gap(88),
const TitleWidget(
firstTextSize: 24,
secondTextSize: 40,
logoSize: 124,
),
const Gap(32),
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
child: Image.asset('assets/ph_logo.webp',
width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
),
const Gap(64),
ButtonWidget(text: 'Login', onPressed: gotoLogin),
const Gap(8),
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
const Gap(32),
const SloganWidget(),
const Gap(32),
const MaxGap(500),
const TextWidget(
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
size: 10,
bold: true,
),
const TextWidget(
text: 'Developed By: Pat Alcala',
size: 8,
opacity: 0.8,
),
const Gap(16),
],
body: PullRefreshWidget(
child: PageBackgroundWidget(
child: Column(
children: [
const Gap(88),
const TitleWidget(
firstTextSize: 24,
secondTextSize: 40,
logoSize: 124,
),
const Gap(32),
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
child: Image.asset('assets/ph_logo.webp',
width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
),
const Gap(64),
ButtonWidget(text: 'Login', onPressed: gotoLogin),
const Gap(8),
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
const Gap(32),
const SloganWidget(),
const Gap(32),
const MaxGap(500),
const TextWidget(
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
size: 10,
bold: true,
),
const TextWidget(
text: 'Developed By: Pat Alcala',
size: 8,
opacity: 0.8,
),
const Gap(16),
],
),
),
));
}

View file

@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/auth/auth_service.dart';
import 'package:pharmacy_mobile/widgets/button_widget.dart';
import 'package:pharmacy_mobile/widgets/menu_widget2.dart';
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
import 'package:pharmacy_mobile/widgets/pull_refresh_widget.dart';
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
import 'package:pharmacy_mobile/widgets/title_widget.dart';
@ -31,81 +32,83 @@ class _MainPageState extends State<MainPage> {
canPop: false,
child: Scaffold(
resizeToAvoidBottomInset: false,
body: SingleChildScrollView(
child: PageBackgroundWidget(
height: MediaQuery.of(context).size.height + 400,
page: 'menu',
child: Center(
child: Column(
children: [
const Gap(96),
const TitleWidget(
firstTextSize: 14,
secondTextSize: 24,
logoSize: 90,
),
const Gap(32),
const TextWidget(
text: 'Menu',
title: true,
),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Type',
description: 'Create a new medical type',
onPressed: () => {context.push('/addtype')},
color: 'blue',
),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Category',
description: 'Create a new medicine category',
onPressed: () => {context.push('/addcategory')},
color: 'blue',
),
const Gap(16),
MenuWidget(
body: PullRefreshWidget(
child: SingleChildScrollView(
child: PageBackgroundWidget(
height: MediaQuery.of(context).size.height + 400,
page: 'menu',
child: Center(
child: Column(
children: [
const Gap(96),
const TitleWidget(
firstTextSize: 14,
secondTextSize: 24,
logoSize: 90,
),
const Gap(32),
const TextWidget(
text: 'Menu',
title: true,
),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Generics',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addgenerics')},
color: 'blue'),
const Gap(32),
MenuWidget(
text: 'Add Type',
description: 'Create a new medical type',
onPressed: () => {context.push('/addtype')},
color: 'blue',
),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Medicine',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addmedicines')},
color: 'green'),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Stock',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addstock')},
color: 'green'),
const Gap(32),
MenuWidget(
icon: Icons.delete,
text: 'Remove Stock',
description: 'Add generic name on the list',
onPressed: () => {context.push('/deletestock')},
color: 'red'),
const Gap(32),
MenuWidget(
icon: FontAwesomeIcons.listCheck,
text: 'List of Stocks',
description: 'Add generic name on the list',
onPressed: () => {context.push('/liststocks')},
color: 'yellow'),
const Gap(40),
ButtonWidget(
text: 'Logout',
onPressed: signOut,
)
],
text: 'Add Category',
description: 'Create a new medicine category',
onPressed: () => {context.push('/addcategory')},
color: 'blue',
),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Generics',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addgenerics')},
color: 'blue'),
const Gap(32),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Medicine',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addmedicines')},
color: 'green'),
const Gap(16),
MenuWidget(
icon: FontAwesomeIcons.circlePlus,
text: 'Add Stock',
description: 'Add generic name on the list',
onPressed: () => {context.push('/addstock')},
color: 'green'),
const Gap(32),
MenuWidget(
icon: Icons.delete,
text: 'Remove Stock',
description: 'Add generic name on the list',
onPressed: () => {context.push('/deletestock')},
color: 'red'),
const Gap(32),
MenuWidget(
icon: FontAwesomeIcons.listCheck,
text: 'List of Stocks',
description: 'Add generic name on the list',
onPressed: () => {context.push('/liststocks')},
color: 'yellow'),
const Gap(40),
ButtonWidget(
text: 'Logout',
onPressed: signOut,
)
],
),
),
),
),