update
This commit is contained in:
parent
4586256032
commit
5840df0879
16 changed files with 45 additions and 61 deletions
|
|
@ -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)
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue