1) buildmedlist - update data to add unit and form when clicking a medicine
This commit is contained in:
@@ -17,9 +17,9 @@ class BuildMedicinesList extends StatefulWidget {
|
||||
State<BuildMedicinesList> createState() => _BuildMedicinesListState();
|
||||
}
|
||||
|
||||
int indexOn = 0;
|
||||
|
||||
class _BuildMedicinesListState extends State<BuildMedicinesList> {
|
||||
int indexOn = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.separated(
|
||||
@@ -35,7 +35,8 @@ class _BuildMedicinesListState extends State<BuildMedicinesList> {
|
||||
"${widget.medicines[index].unit} - ${widget.medicines[index].form}"),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.contoller.text = widget.medicines[index].name;
|
||||
widget.contoller.text =
|
||||
"${widget.medicines[index].name}%t${widget.medicines[index].unit}%t${widget.medicines[index].form}";
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user