update
This commit is contained in:
parent
4586256032
commit
5840df0879
16 changed files with 45 additions and 61 deletions
26
.metadata
26
.metadata
|
|
@ -4,8 +4,8 @@
|
|||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "archlinuxaur0000000000000000000000000000"
|
||||
channel: ""
|
||||
revision: "c519ee916eaeb88923e67befb89c0f1dabfa83e6"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
|
|
@ -13,23 +13,11 @@ project_type: app
|
|||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
- platform: android
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
- platform: ios
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
- platform: linux
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
- platform: macos
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
- platform: windows
|
||||
create_revision: archlinuxaur0000000000000000000000000000
|
||||
base_revision: archlinuxaur0000000000000000000000000000
|
||||
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||
- platform: web
|
||||
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
|
||||
|
||||
# User provided section
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class _AddCategoryPageState extends State<AddCategoryPage> {
|
|||
InputWidget(label: 'Category Name', controller: _categoryController),
|
||||
const Gap(32),
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
else
|
||||
ButtonWidget(text: 'Save Category', onPressed: _saveCategory)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
|
|||
onChanged: _updateManufactorer)),
|
||||
const Gap(32),
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
else
|
||||
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
|||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||
|
||||
// import 'package:intl/intl.dart';
|
||||
|
||||
class AddStockPage extends StatefulWidget {
|
||||
const AddStockPage({super.key});
|
||||
|
||||
|
|
@ -40,7 +38,7 @@ class _AddStockPageState extends State<AddStockPage> {
|
|||
_selectedMedicine = medicine;
|
||||
}
|
||||
|
||||
void saveStock() async {
|
||||
void _saveStock() async {
|
||||
final stockNameUUID = await _refMedicines.getUUID(_selectedMedicine);
|
||||
final stockQuantity = _quantityController.text;
|
||||
final stockExpiration = _dateController.text;
|
||||
|
|
@ -97,7 +95,7 @@ class _AddStockPageState extends State<AddStockPage> {
|
|||
value: selectedDate,
|
||||
),
|
||||
const Gap(16),
|
||||
ButtonWidget(text: 'Add Stock', onPressed: saveStock)
|
||||
ButtonWidget(text: 'Add Stock', onPressed: _saveStock)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class _AddTypePageState extends State<AddTypePage> {
|
|||
|
||||
bool _isLoading = false;
|
||||
|
||||
void saveType() async {
|
||||
void _saveType() async {
|
||||
setState(() => _isLoading = true);
|
||||
try {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
|
|
@ -83,9 +83,9 @@ class _AddTypePageState extends State<AddTypePage> {
|
|||
InputWidget(label: 'Type Name', controller: _typeController),
|
||||
const Gap(32),
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
else
|
||||
ButtonWidget(text: 'Save Type', onPressed: saveType)
|
||||
ButtonWidget(text: 'Save Type', onPressed: _saveType)
|
||||
],
|
||||
),
|
||||
)),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
// import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
|
|
@ -16,7 +13,6 @@ class IndexPage extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
void gotoLogin() {
|
||||
log(MediaQuery.of(context).size.height.toString());
|
||||
context.push('/login');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ class _ListStocksPageState extends State<ListStocksPage> {
|
|||
const TextWidget(text: 'List of Stocks'),
|
||||
const Gap(16),
|
||||
if (_isLoading)
|
||||
Center(
|
||||
const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.white,
|
||||
color: Color.fromRGBO(255, 255, 255, 1),
|
||||
))
|
||||
else if (_stockList.isEmpty)
|
||||
// TextWidget(text: 'No Stock Listed')
|
||||
|
|
@ -105,11 +105,11 @@ class _ListStocksPageState extends State<ListStocksPage> {
|
|||
border: Border.all(color: const Color.fromRGBO(205, 59, 208, 0.702), width: 2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16.0),
|
||||
child: Text(
|
||||
'No Stock Listed',
|
||||
style: GoogleFonts.outfit(
|
||||
color: Color.fromRGBO(255, 255, 255, 1),
|
||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -115,13 +115,13 @@ class _LoginPageState extends State<LoginPage> {
|
|||
Padding(
|
||||
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),
|
||||
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||
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),
|
||||
|
|
@ -148,7 +148,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
const Gap(40),
|
||||
// TextButton(onPressed: () => {_signIn()}, child: const Text('Login'))
|
||||
if (_isLoading)
|
||||
Center(child: CircularProgressIndicator(color: Colors.white))
|
||||
const Center(child: CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)))
|
||||
else
|
||||
ButtonWidget(text: 'Login', onPressed: _signIn)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ class ButtonWidget extends StatelessWidget {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
||||
minimumSize: Size(MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320,
|
||||
44), // minimum size
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
)
|
||||
: ElevatedButton.styleFrom(
|
||||
|
|
@ -29,7 +30,8 @@ class ButtonWidget extends StatelessWidget {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12), // rounded corners
|
||||
),
|
||||
minimumSize: Size(MediaQuery.of(context).size.width - 96, 44), // minimum size
|
||||
minimumSize: Size(MediaQuery.of(context).size.width <= 768 ? MediaQuery.of(context).size.width - 96 : 320,
|
||||
44), // minimum size
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ class DataTableWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return DataTable(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black, width: 1.0),
|
||||
border: Border.all(color: const Color.fromRGBO(0, 0, 0, 1), width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
color: Color.fromARGB(255, 240, 240, 240),
|
||||
color: const Color.fromARGB(255, 240, 240, 240),
|
||||
),
|
||||
headingTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
|
||||
dataTextStyle: GoogleFonts.outfit(textStyle: const TextStyle(fontSize: 14)),
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class DatePickerWidget extends StatelessWidget {
|
|||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
readOnly: true,
|
||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
|
|
@ -46,7 +46,7 @@ class DatePickerWidget extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.white, width: 1),
|
||||
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1), width: 1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: TextButton(
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class DropDownWidget extends StatelessWidget {
|
|||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12), // Set the desired border radius
|
||||
border: Border.all(color: Colors.white), // Set the border color
|
||||
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1)), // Set the border color
|
||||
),
|
||||
child: DropdownMenu(
|
||||
initialSelection: '',
|
||||
|
|
@ -42,14 +42,14 @@ class DropDownWidget extends StatelessWidget {
|
|||
label: item[listTitle].toString(),
|
||||
value: item[listTitle],
|
||||
style: ButtonStyle(
|
||||
foregroundColor: WidgetStateProperty.all<Color>(Colors.white),
|
||||
foregroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(255, 255, 255, 1)),
|
||||
textStyle: WidgetStateProperty.all<TextStyle>(
|
||||
GoogleFonts.outfit(fontSize: 16, fontWeight: FontWeight.w500)))),
|
||||
],
|
||||
onSelected: onChanged,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
||||
textStyle: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white)),
|
||||
textStyle: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1))),
|
||||
menuStyle: MenuStyle(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(23, 37, 62, 0.8)),
|
||||
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16)),
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class DropdownWrapperWidget extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
spacing: 16,
|
||||
children: [
|
||||
CircularProgressIndicator(color: Colors.white),
|
||||
const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)),
|
||||
TextWidget(
|
||||
text: 'Fetching $text',
|
||||
size: 16,
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ class FormBorderWidget extends StatelessWidget {
|
|||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||
child: Container(
|
||||
padding: EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||
decoration: BoxDecoration(
|
||||
color: _getColor(color ?? ''),
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||
const BoxShadow(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.2), // Subtle shadow to give depth
|
||||
spreadRadius: 0,
|
||||
blurRadius: 4,
|
||||
offset: Offset(0, 2),
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ class InputWidget extends StatelessWidget {
|
|||
controller: controller,
|
||||
decoration: InputDecoration(
|
||||
filled: true, // Enable filling the background
|
||||
fillColor: Colors.white,
|
||||
fillColor: const Color.fromRGBO(255, 255, 255, 1),
|
||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
|
||||
style: GoogleFonts.outfit(textStyle: TextStyle(color: const Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 24)),
|
||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
||||
obscureText: password ?? false,
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ class MenuWidget extends StatelessWidget {
|
|||
onTap: onPressed,
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width - 96,
|
||||
padding: EdgeInsets.only(top: 16, bottom: 16),
|
||||
padding: const EdgeInsets.only(top: 16, bottom: 16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(255, 255, 255, 0.6),
|
||||
width: 2),
|
||||
color: color != null ? _getColorBasedOnString(color ?? '') : Colors.transparent,
|
||||
color: color != null ? _getColorBasedOnString(color ?? '') : const Color.fromRGBO(0, 0, 0, 0),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
|
@ -61,7 +61,7 @@ class MenuWidget extends StatelessWidget {
|
|||
case 'teal':
|
||||
return teal;
|
||||
default:
|
||||
return Colors.transparent; // Default to transparent if color is not recognized
|
||||
return const Color.fromRGBO(0, 0, 0, 0); // Default to transparent if color is not recognized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue