setIconForAcceptedBarcode method

Future<void> setIconForAcceptedBarcode(
  1. TrackedBarcode trackedBarcode,
  2. BarcodeCountIcon? icon
)

Sets a BarcodeCountIcon to be used for a particular accepted TrackedBarcode. This will override any other applicable icon for this particular barcode.

Used only when the view uses the BarcodeCountViewStyle.icon style.

On iOS, passing null suppresses the highlight for the given barcode. On Android, passing null removes the override, so the barcode reverts to its default or listener-provided icon.

The icon is applied while answering the corresponding view listener callback for that barcode. Calling this method at another time resolves without changing the icon, as the pre-existing brush setters do.

Added in version 8.7.0

Implementation

Future<void> setIconForAcceptedBarcode(TrackedBarcode trackedBarcode, BarcodeCountIcon? icon) {
  return _controller?.setIconForAcceptedBarcode(trackedBarcode, icon) ?? Future.value();
}