|
|
|
@ -60,8 +60,8 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
|
|
|
|
|
hintText: TranslationBase.of(context).searchMedicineNameHere,
|
|
|
|
|
controller: myController,
|
|
|
|
|
onSaved: (value) {},
|
|
|
|
|
onFieldSubmitted: (value){
|
|
|
|
|
searchMedicine(context);
|
|
|
|
|
onFieldSubmitted: (value) {
|
|
|
|
|
searchMedicine(context);
|
|
|
|
|
},
|
|
|
|
|
textInputAction: TextInputAction.search,
|
|
|
|
|
inputFormatter: ONLY_LETTERS),
|
|
|
|
@ -92,7 +92,10 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).youCanFind +
|
|
|
|
|
(_medicineProvider.pharmacyItemsList == null ? "0" : _medicineProvider.pharmacyItemsList.length.toString()) +
|
|
|
|
|
(_medicineProvider.pharmacyItemsList == null
|
|
|
|
|
? "0"
|
|
|
|
|
: _medicineProvider.pharmacyItemsList.length
|
|
|
|
|
.toString()) +
|
|
|
|
|
TranslationBase.of(context).itemsInSearch,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
margin: 5,
|
|
|
|
@ -116,12 +119,19 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
|
|
|
|
|
: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: _medicineProvider.pharmacyItemsList == null ? 0 : _medicineProvider.pharmacyItemsList.length,
|
|
|
|
|
itemCount: _medicineProvider.pharmacyItemsList ==
|
|
|
|
|
null
|
|
|
|
|
? 0
|
|
|
|
|
: _medicineProvider.pharmacyItemsList.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: MedicineItemWidget(
|
|
|
|
|
label: _medicineProvider.pharmacyItemsList[index]["ItemDescription"],
|
|
|
|
|
url: _medicineProvider.pharmacyItemsList[index]["ProductImageBase64"],
|
|
|
|
|
label:
|
|
|
|
|
_medicineProvider.pharmacyItemsList[index]
|
|
|
|
|
["ItemDescription"],
|
|
|
|
|
url:
|
|
|
|
|
_medicineProvider.pharmacyItemsList[index]
|
|
|
|
|
["ProductImageBase64"],
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
@ -129,9 +139,12 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
PharmaciesListScreen(
|
|
|
|
|
itemID: _medicineProvider.pharmacyItemsList[index]["ItemID"],
|
|
|
|
|
url: _medicineProvider.pharmacyItemsList[index]
|
|
|
|
|
["ProductImageBase64"]),
|
|
|
|
|
itemID: _medicineProvider
|
|
|
|
|
.pharmacyItemsList[index]
|
|
|
|
|
["ItemID"],
|
|
|
|
|
url: _medicineProvider
|
|
|
|
|
.pharmacyItemsList[index]
|
|
|
|
|
["ProductImageBase64"]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|