update
This commit is contained in:
parent
7e1ad68433
commit
b5151a053d
9 changed files with 118 additions and 39 deletions
|
|
@ -17,10 +17,10 @@ class AddMedicinePage extends StatefulWidget {
|
|||
const AddMedicinePage({super.key});
|
||||
|
||||
@override
|
||||
AddMedicinePageState createState() => AddMedicinePageState();
|
||||
State<AddMedicinePage> createState() => _AddMedicinePageState();
|
||||
}
|
||||
|
||||
class AddMedicinePageState extends State<AddMedicinePage> {
|
||||
class _AddMedicinePageState extends State<AddMedicinePage> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
// final _authService = AuthService();
|
||||
final _refGenericNames = RefGenericNames();
|
||||
|
|
@ -40,12 +40,6 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
|||
late List _manufactorerList = [];
|
||||
late String _selectedManufactorer = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
autoRun();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void autoRun() async {
|
||||
_genericNameList = await _refGenericNames.getList();
|
||||
_typeList = await _refTypes.getList();
|
||||
|
|
@ -79,6 +73,12 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
|||
await _refMedicines.postMedicine(medName, medGenericUUID, medManufactorerUUID, medTypeUUID);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
autoRun();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nameController.dispose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue