Code, ScanningWrapper, and many other classes have been coupled to Google's ML Kit in one way or another (using Barcode, or ML Kit's type constants).
One suggestion is to use a Translator to "translate" the data from an abstract source(zxing, Google/Huawei ML Kit, etc.) into a general format in Code (e.g. Code's constructor accepting Barcodes will be replaced by a Translator which helps to convert them into a Code.) to decouple Google ML Kit from the codebase.
Code,ScanningWrapper, and many other classes have been coupled to Google's ML Kit in one way or another (usingBarcode, or ML Kit's type constants).One suggestion is to use a
Translatorto "translate" the data from an abstract source(zxing, Google/Huawei ML Kit, etc.) into a general format inCode(e.g.Code's constructor acceptingBarcodes will be replaced by aTranslatorwhich helps to convert them into aCode.) to decouple Google ML Kit from the codebase.