null safety

This commit is contained in:
phyothandar
2021-09-10 17:14:59 +06:30
parent 4f7aa1b252
commit 2c95ec7600
21 changed files with 54 additions and 51 deletions

View File

@@ -147,7 +147,7 @@ class PackageSearchDelegate extends SearchDelegate<Package> {
// Barcode bc = barcodes.firstWhere((element) => true);
// String barcode;
// if (bc != null) barcode = bc.rawValue;
String barcode = await scanBarcode();
String? barcode = await scanBarcode();
if (barcode != null) {
query = barcode;
showResults(context);