update
This commit is contained in:
parent
bda39a56d0
commit
37a855cc6c
21 changed files with 176 additions and 226 deletions
|
|
@ -144,9 +144,9 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
|
|||
InputWidget(label: 'Name', controller: _nameController),
|
||||
const Gap(16),
|
||||
if (_categoryList.isEmpty)
|
||||
Column(
|
||||
const Column(
|
||||
children: [
|
||||
const Gap(8),
|
||||
Gap(8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
@ -173,7 +173,7 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
|
|||
),
|
||||
const Gap(32),
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
else
|
||||
ButtonWidget(text: 'Add', onPressed: saveGeneric)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
|||
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/dropdown_wrappermulti_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
||||
import 'package:pharmacy_mobile/widgets/image_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/scanbarcode_widget.dart';
|
||||
|
|
@ -309,10 +310,17 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
|
|||
const Gap(16),
|
||||
if (imageUrl.isNotEmpty)
|
||||
Center(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12), // Add your desired border radius here
|
||||
child: Image.network(imageUrl, fit: BoxFit.cover, width: 250, height: 250)),
|
||||
)
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(12), // Add your desired border radius here
|
||||
child: ImageWidget(
|
||||
imagePath: imageUrl,
|
||||
size: 250,
|
||||
measureByHeight: false,
|
||||
network: true,
|
||||
))
|
||||
// Image.network(imageUrl, fit: BoxFit.cover, width: 250, height: 250)),
|
||||
)
|
||||
else
|
||||
ButtonWidget(
|
||||
text: 'Add Image',
|
||||
|
|
@ -326,37 +334,6 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
|
|||
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
|
||||
])
|
||||
]),
|
||||
// DropdownWrapperWidget(
|
||||
// list: _genericNameList,
|
||||
// text: 'Generics',
|
||||
// widget: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// DropDownWidget(
|
||||
// label: 'Generic Name',
|
||||
// list: _genericNameList,
|
||||
// listTitle: 'generic_name',
|
||||
// onChanged: _updateGeneric),
|
||||
// const Gap(8),
|
||||
// TextWidget(text: _selectedCategory, size: 18),
|
||||
// ],
|
||||
// )),
|
||||
// const Gap(16),
|
||||
// DropdownWrapperWidget(
|
||||
// list: _typeList,
|
||||
// text: 'Types',
|
||||
// widget: DropDownWidget(
|
||||
// label: 'Type', list: _typeList, listTitle: 'type_name', onChanged: _updateType)),
|
||||
// const Gap(16),
|
||||
// DropdownWrapperWidget(
|
||||
// list: _manufactorerList,
|
||||
// text: 'Manufactorers',
|
||||
// widget: DropDownWidget(
|
||||
// label: 'Manufactorer',
|
||||
// list: _manufactorerList,
|
||||
// listTitle: 'manufactorer_name',
|
||||
// onChanged: _updateManufactorer)),
|
||||
// const Gap(32),
|
||||
],
|
||||
),
|
||||
)))
|
||||
|
|
|
|||
|
|
@ -157,14 +157,14 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
// ),
|
||||
// ],
|
||||
),
|
||||
child: Row(
|
||||
child: const Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.qr_code_scanner,
|
||||
color: Colors.white,
|
||||
size: 22,
|
||||
),
|
||||
const Gap(8),
|
||||
Gap(8),
|
||||
TextWidget(
|
||||
text: 'Scan Barcode',
|
||||
size: 14,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ class CustomerMainPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _CustomerMainPageState extends State<CustomerMainPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
|
@ -68,10 +67,10 @@ class _CustomerMainPageState extends State<CustomerMainPage> {
|
|||
margin: 32,
|
||||
),
|
||||
const Gap(16),
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const TextWidget(
|
||||
TextWidget(
|
||||
text: 'Doctor Consultation',
|
||||
title: true,
|
||||
size: 14,
|
||||
|
|
|
|||
|
|
@ -93,16 +93,16 @@ class _CustomerSearchPageState extends State<CustomerSearchPage> {
|
|||
Column(
|
||||
children: [
|
||||
const Gap(96),
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Gap(16),
|
||||
const LogoWidget(size: 56),
|
||||
Gap(16),
|
||||
LogoWidget(size: 56),
|
||||
],
|
||||
),
|
||||
const Gap(8),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 64, right: 64),
|
||||
padding: const EdgeInsets.only(left: 64, right: 64),
|
||||
child: Column(
|
||||
children: [
|
||||
InputWidget(
|
||||
|
|
|
|||
|
|
@ -146,12 +146,12 @@ class _DeleteStockPageState extends State<DeleteStockPage> {
|
|||
InputWidget(label: 'Quantity', controller: _quantityController, onChanged: _setQuantity),
|
||||
const Gap(32),
|
||||
if (_noStock)
|
||||
WarningWidget(
|
||||
const WarningWidget(
|
||||
text: 'Removing Disabled',
|
||||
warning: 'Quantity is above sssss',
|
||||
)
|
||||
else if (_aboveQuantity)
|
||||
WarningWidget(
|
||||
const WarningWidget(
|
||||
text: 'Removing Disabled',
|
||||
warning: 'Quantity is above stocked',
|
||||
)
|
||||
|
|
|
|||
|
|
@ -46,52 +46,46 @@ class IndexPage extends StatelessWidget {
|
|||
const SloganWidget(),
|
||||
const Gap(32),
|
||||
const MaxGap(500),
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const TextWidget(
|
||||
TextWidget(
|
||||
text: 'Copyright © 2025 -',
|
||||
size: 10,
|
||||
bold: true,
|
||||
),
|
||||
const Gap(4),
|
||||
const LogoWidget(size: 28),
|
||||
const Gap(4),
|
||||
const TextWidget(
|
||||
Gap(4),
|
||||
LogoWidget(size: 28),
|
||||
Gap(4),
|
||||
TextWidget(
|
||||
text: 'Ofelia Franco-Alcala Pharmacy',
|
||||
size: 10,
|
||||
bold: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const TextWidget(
|
||||
TextWidget(
|
||||
text: 'Developed By:',
|
||||
size: 8,
|
||||
opacity: 0.8,
|
||||
),
|
||||
const Gap(4),
|
||||
const ImageWidget(
|
||||
Gap(4),
|
||||
ImageWidget(
|
||||
imagePath: 'assets/pat-alcala_logo.webp',
|
||||
size: 16,
|
||||
measureByHeight: true,
|
||||
),
|
||||
const Gap(4),
|
||||
const TextWidget(
|
||||
Gap(4),
|
||||
TextWidget(
|
||||
text: 'Pat Alcala',
|
||||
size: 8,
|
||||
opacity: 0.8,
|
||||
),
|
||||
],
|
||||
)
|
||||
// const TextWidget(
|
||||
// text: 'Developed By: Pat Alcala',
|
||||
// size: 8,
|
||||
// opacity: 0.8,
|
||||
// ),
|
||||
// const Gap(16),
|
||||
],
|
||||
),
|
||||
));
|
||||
|
|
|
|||
|
|
@ -107,20 +107,15 @@ class _ListStocksPageState extends State<ListStocksPage> {
|
|||
))
|
||||
else if (_stockList.isEmpty)
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color.fromRGBO(205, 59, 208, 0.702), width: 2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
||||
child: Text(
|
||||
'No Stock Listed',
|
||||
style: GoogleFonts.outfit(
|
||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color.fromRGBO(205, 59, 208, 0.702), width: 2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
)
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
||||
child: const TextWidget(
|
||||
text: 'No Stock Listed',
|
||||
size: 14,
|
||||
))
|
||||
else
|
||||
DataTableWidget(
|
||||
column: _createColumns(),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import 'package:pharmacy_mobile/auth/auth_service.dart';
|
|||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/menu_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/snackbar_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||
|
|
|
|||
|
|
@ -125,12 +125,12 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||
child: Container(
|
||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromRGBO(57, 38, 62, 0.6),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color.fromRGBO(57, 38, 62, 0.6),
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||
spreadRadius: 0,
|
||||
blurRadius: 4,
|
||||
offset: Offset(0, 2),
|
||||
|
|
@ -155,7 +155,7 @@ class _RegisterPageState extends State<RegisterPage> {
|
|||
const Gap(40),
|
||||
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
else
|
||||
ButtonWidget(text: 'Create Account', onPressed: _signUp)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -4,12 +4,21 @@ class ImageWidget extends StatelessWidget {
|
|||
final String imagePath;
|
||||
final double size;
|
||||
final bool measureByHeight;
|
||||
const ImageWidget({super.key, required this.imagePath, required this.size, required this.measureByHeight});
|
||||
final bool? network;
|
||||
const ImageWidget(
|
||||
{super.key, required this.imagePath, required this.size, required this.measureByHeight, this.network});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return (measureByHeight)
|
||||
? Image.asset(imagePath, height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round())
|
||||
: Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round());
|
||||
return (network == true)
|
||||
? (measureByHeight)
|
||||
? Image.network(imagePath,
|
||||
height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round())
|
||||
: Image.network(imagePath,
|
||||
width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round())
|
||||
: (measureByHeight)
|
||||
? Image.asset(imagePath,
|
||||
height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round())
|
||||
: Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue