This commit is contained in:
Patrick Alvin Alcala 2025-02-04 12:33:00 +08:00
parent 7fca1e79a8
commit 75cbdbf2fa
6 changed files with 157 additions and 97 deletions

View file

@ -7,6 +7,7 @@ import 'package:pharmacy_mobile/tables/ref_medicines.dart';
import 'package:pharmacy_mobile/tables/ref_types.dart';
import 'package:pharmacy_mobile/widgets/button_widget.dart';
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
import 'package:pharmacy_mobile/widgets/form_border_widget.dart';
import 'package:pharmacy_mobile/widgets/input_widget.dart';
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
@ -116,39 +117,42 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
const Gap(32),
const TextWidget(text: 'Add Medicine'),
const Gap(16),
Form(
key: _formKey,
child: Center(
child: Column(
children: [
InputWidget(label: 'Name', controller: _nameController),
const Gap(16),
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),
DropDownWidget(
label: 'Type', list: _typeList, listTitle: 'type_name', onChanged: _updateType),
const Gap(16),
DropDownWidget(
label: 'Manufactorer',
list: _manufactorerList,
listTitle: 'manufactorer_name',
onChanged: _updateManufactorer),
const Gap(16),
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
],
),
))
FormBorderWidget(
color: 'green',
child: Form(
key: _formKey,
child: Center(
child: Column(
children: [
InputWidget(label: 'Name', controller: _nameController),
const Gap(16),
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),
DropDownWidget(
label: 'Type', list: _typeList, listTitle: 'type_name', onChanged: _updateType),
const Gap(16),
DropDownWidget(
label: 'Manufactorer',
list: _manufactorerList,
listTitle: 'manufactorer_name',
onChanged: _updateManufactorer),
const Gap(16),
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
],
),
)),
)
],
),
),