Skip to main content

ProGuard | Flutter Document Scanner

Default Flutter rules#

-keep class io.flutter.view.** { *; }-keep class io.flutter.** { *; }-keep class io.flutter.plugins.** { *; }-dontwarn io.flutter.embedding.**-ignorewarnings-dontoptimize

For the Scanbot SDK Flutter Plugin#

-keeppackagenames io.scanbot.sdk.flutter.**-keep public class io.scanbot.sdk.flutter.**{ *; }

For the native Scanbot SDK#



Since Scanbot SDK version 1.74.0 consumer ProGuard rules are integrated into the library and automatically applied to customers' modules.**

If you are using an older Scanbot SDK version you have to add these ProGuard rules for all Scanbot SDK Packages:

v1.73.x (or older)#

-keep public class io.scanbot.sdk.ui.** { *; }
-keep public class { *; }
-keeppackagenames io.scanbot.sdk.core.contourdetector.**-keep public class io.scanbot.sdk.core.contourdetector.**{ *; }
-keeppackagenames**-keep public class**{ *; }
-keeppackagenames io.scanbot.sdk.core.payformscanner.**-keep public class io.scanbot.sdk.core.payformscanner.**{ *; }
-keeppackagenames io.scanbot.mrzscanner.**-keep public class io.scanbot.mrzscanner.**{ *; }
-keeppackagenames io.scanbot.dcscanner.**-keep public class io.scanbot.dcscanner.**{ *; }
-keeppackagenames io.scanbot.tiffwriter.**-keep public class io.scanbot.tiffwriter.**{ *; }
-keeppackagenames io.scanbot.chequescanner.**-keep public class io.scanbot.chequescanner.**{ *; }
-keeppackagenames io.scanbot.textorientation.**-keep public class io.scanbot.textorientation.**{ *; }
-keeppackagenames io.scanbot.barcodescanner.**-keep public class io.scanbot.barcodescanner.**{ *; }
-keeppackagenames io.scanbot.hicscanner.**-keep public class io.scanbot.hicscanner.**{ *; }
-keeppackagenames io.scanbot.sdk.process.**-keep public class io.scanbot.sdk.process.**{ *; }
-keeppackagenames io.scanbot.multipleobjectsscanner.**-keep public class io.scanbot.multipleobjectsscanner.**{ *; }
-keeppackagenames io.scanbot.idcardscanner.**-keep public class io.scanbot.idcardscanner.**{ *; }
-keeppackagenames io.scanbot.generictext.**-keep public class io.scanbot.generictext.**{ *; }
-keeppackagenames io.scanbot.nfcscanner.passport.**-keep public class io.scanbot.nfcscanner.passport.**{ *; }-keep public class io.scanbot.nfcscanner.**{ *; }
# Gson# Gson uses generic type information stored in a class file when working with fields. Proguard# removes such information by default, so configure it to keep all this information.-keepattributes Signature
# For using GSON @Expose annotation-keepattributes *Annotation*
# Gson specific classes-dontwarn sun.misc.**-keep class** { *; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)-keep class * implements class * implements class * implements class * implements
# Prevent R8 from leaving Data object members always null-keepclassmembers,allowobfuscation class * { <fields>;}