update
This commit is contained in:
parent
6e4b2249b0
commit
a56ed92863
6 changed files with 128 additions and 125 deletions
BIN
assets/pat-alcala_logo.webp
Normal file
BIN
assets/pat-alcala_logo.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
|
|
@ -3,7 +3,6 @@ import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_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/slogan_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||||
|
|
@ -23,43 +22,60 @@ class IndexPage extends StatelessWidget {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
body: PullRefreshWidget(
|
body: PageBackgroundWidget(
|
||||||
child: PageBackgroundWidget(
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
const Gap(88),
|
||||||
const Gap(88),
|
const TitleWidget(
|
||||||
const TitleWidget(
|
firstTextSize: 24,
|
||||||
firstTextSize: 24,
|
secondTextSize: 40,
|
||||||
secondTextSize: 40,
|
logoSize: 124,
|
||||||
logoSize: 124,
|
),
|
||||||
),
|
const Gap(32),
|
||||||
const Gap(32),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
|
child: Image.asset('assets/ph_logo.webp',
|
||||||
child: Image.asset('assets/ph_logo.webp',
|
width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
|
||||||
width: 192, cacheWidth: (192 * MediaQuery.of(context).devicePixelRatio).round()),
|
),
|
||||||
),
|
const Gap(64),
|
||||||
const Gap(64),
|
ButtonWidget(text: 'Login', onPressed: gotoLogin),
|
||||||
ButtonWidget(text: 'Login', onPressed: gotoLogin),
|
const Gap(8),
|
||||||
const Gap(8),
|
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
||||||
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
const Gap(32),
|
||||||
const Gap(32),
|
const SloganWidget(),
|
||||||
const SloganWidget(),
|
const Gap(32),
|
||||||
const Gap(32),
|
const MaxGap(500),
|
||||||
const MaxGap(500),
|
const TextWidget(
|
||||||
const TextWidget(
|
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
|
||||||
text: 'Copyright © 2025 - Ofelia Franco-Alcala Pharmacy',
|
size: 10,
|
||||||
size: 10,
|
bold: true,
|
||||||
bold: true,
|
),
|
||||||
),
|
Row(
|
||||||
const TextWidget(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
text: 'Developed By: Pat Alcala',
|
children: [
|
||||||
size: 8,
|
const TextWidget(
|
||||||
opacity: 0.8,
|
text: 'Developed By:',
|
||||||
),
|
size: 8,
|
||||||
const Gap(16),
|
opacity: 0.8,
|
||||||
],
|
),
|
||||||
),
|
const Gap(4),
|
||||||
|
Image.asset('assets/pat-alcala_logo.webp',
|
||||||
|
height: 12, cacheHeight: (12 * MediaQuery.of(context).devicePixelRatio).round()),
|
||||||
|
const Gap(4),
|
||||||
|
const TextWidget(
|
||||||
|
text: 'Pat Alcala',
|
||||||
|
size: 8,
|
||||||
|
opacity: 0.8,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
// const TextWidget(
|
||||||
|
// text: 'Developed By: Pat Alcala',
|
||||||
|
// size: 8,
|
||||||
|
// opacity: 0.8,
|
||||||
|
// ),
|
||||||
|
// const Gap(16),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
@ -7,7 +5,6 @@ import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/logo_widget.dart';
|
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||||
|
|
@ -31,8 +28,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
void _signIn() async {
|
void _signIn() async {
|
||||||
// if (_isLoading) return;
|
|
||||||
|
|
||||||
final email = _emailController.text;
|
final email = _emailController.text;
|
||||||
final password = _passwordController.text;
|
final password = _passwordController.text;
|
||||||
|
|
||||||
|
|
@ -81,7 +76,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
final errorMessage = e.message;
|
final errorMessage = e.message;
|
||||||
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
// showNotification(context, 'Error: $errorMessage', false);
|
|
||||||
if (errorMessage == 'Invalid login credentials') {
|
if (errorMessage == 'Invalid login credentials') {
|
||||||
showNotification(context, 'Error: Invalid Email or Password', false);
|
showNotification(context, 'Error: Invalid Email or Password', false);
|
||||||
}
|
}
|
||||||
|
|
@ -90,12 +84,6 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isLoading = false);
|
setState(() => _isLoading = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (mounted) {
|
|
||||||
// context.showSnackBar('Check your email for a login link!');
|
|
||||||
|
|
||||||
// _emailController.clear();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -32,83 +32,81 @@ class _MainPageState extends State<MainPage> {
|
||||||
canPop: false,
|
canPop: false,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
body: PullRefreshWidget(
|
body: SingleChildScrollView(
|
||||||
child: SingleChildScrollView(
|
child: PageBackgroundWidget(
|
||||||
child: PageBackgroundWidget(
|
height: MediaQuery.of(context).size.height + 400,
|
||||||
height: MediaQuery.of(context).size.height + 400,
|
page: 'menu',
|
||||||
page: 'menu',
|
child: Center(
|
||||||
child: Center(
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
const Gap(96),
|
||||||
const Gap(96),
|
const TitleWidget(
|
||||||
const TitleWidget(
|
firstTextSize: 14,
|
||||||
firstTextSize: 14,
|
secondTextSize: 24,
|
||||||
secondTextSize: 24,
|
logoSize: 90,
|
||||||
logoSize: 90,
|
),
|
||||||
),
|
const Gap(32),
|
||||||
const Gap(32),
|
const TextWidget(
|
||||||
const TextWidget(
|
text: 'Menu',
|
||||||
text: 'Menu',
|
title: true,
|
||||||
title: true,
|
),
|
||||||
),
|
const Gap(16),
|
||||||
const Gap(16),
|
MenuWidget(
|
||||||
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(
|
||||||
icon: FontAwesomeIcons.circlePlus,
|
icon: FontAwesomeIcons.circlePlus,
|
||||||
text: 'Add Type',
|
text: 'Add Generics',
|
||||||
description: 'Create a new medical type',
|
description: 'Add generic name on the list',
|
||||||
onPressed: () => {context.push('/addtype')},
|
onPressed: () => {context.push('/addgenerics')},
|
||||||
color: 'blue',
|
color: 'blue'),
|
||||||
),
|
const Gap(32),
|
||||||
const Gap(16),
|
MenuWidget(
|
||||||
MenuWidget(
|
|
||||||
icon: FontAwesomeIcons.circlePlus,
|
icon: FontAwesomeIcons.circlePlus,
|
||||||
text: 'Add Category',
|
text: 'Add Medicine',
|
||||||
description: 'Create a new medicine category',
|
description: 'Add generic name on the list',
|
||||||
onPressed: () => {context.push('/addcategory')},
|
onPressed: () => {context.push('/addmedicines')},
|
||||||
color: 'blue',
|
color: 'green'),
|
||||||
),
|
const Gap(16),
|
||||||
const Gap(16),
|
MenuWidget(
|
||||||
MenuWidget(
|
icon: FontAwesomeIcons.circlePlus,
|
||||||
icon: FontAwesomeIcons.circlePlus,
|
text: 'Add Stock',
|
||||||
text: 'Add Generics',
|
description: 'Add generic name on the list',
|
||||||
description: 'Add generic name on the list',
|
onPressed: () => {context.push('/addstock')},
|
||||||
onPressed: () => {context.push('/addgenerics')},
|
color: 'green'),
|
||||||
color: 'blue'),
|
const Gap(32),
|
||||||
const Gap(32),
|
MenuWidget(
|
||||||
MenuWidget(
|
icon: Icons.delete,
|
||||||
icon: FontAwesomeIcons.circlePlus,
|
text: 'Remove Stock',
|
||||||
text: 'Add Medicine',
|
description: 'Add generic name on the list',
|
||||||
description: 'Add generic name on the list',
|
onPressed: () => {context.push('/deletestock')},
|
||||||
onPressed: () => {context.push('/addmedicines')},
|
color: 'red'),
|
||||||
color: 'green'),
|
const Gap(32),
|
||||||
const Gap(16),
|
MenuWidget(
|
||||||
MenuWidget(
|
icon: FontAwesomeIcons.listCheck,
|
||||||
icon: FontAwesomeIcons.circlePlus,
|
text: 'List of Stocks',
|
||||||
text: 'Add Stock',
|
description: 'Add generic name on the list',
|
||||||
description: 'Add generic name on the list',
|
onPressed: () => {context.push('/liststocks')},
|
||||||
onPressed: () => {context.push('/addstock')},
|
color: 'yellow'),
|
||||||
color: 'green'),
|
const Gap(40),
|
||||||
const Gap(32),
|
ButtonWidget(
|
||||||
MenuWidget(
|
text: 'Logout',
|
||||||
icon: Icons.delete,
|
onPressed: signOut,
|
||||||
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,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
0
lib/widgets/image_widget.dart
Normal file
0
lib/widgets/image_widget.dart
Normal file
|
|
@ -53,3 +53,4 @@ flutter:
|
||||||
- assets/php_logo.webp
|
- assets/php_logo.webp
|
||||||
- assets/images/ofelia.webp
|
- assets/images/ofelia.webp
|
||||||
- assets/images/pamela.webp
|
- assets/images/pamela.webp
|
||||||
|
- assets/pat-alcala_logo.webp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue