Quick Start
MetaMap Flutter plugin Usage Guide
This is a guide to implement Metamap in the Flutter framework
Requirements
Android
Check that the minSdkVersion in <YOUR_APP>/build.gradle is ≥21
iOS
MetaMap's Flutter plugin requires iOS version >12
Important❗
if your flow has a step that uses some native iOS computers, you need to go iOS folder in the project and add permissions in the info.plist iOS permissions
Installation
| LTS version (Recommended for most users): | Current Version(Latest features) |
|---|---|
| 4.5.20 | 4.5.20 |
Add metamap_plugin_flutter dependency to your pubspec.yaml file where <version_number> is either the LTS or the latest version of the plugin:
metamap_plugin_flutter: <version_number>
then run flutter pub get command
📌 Android-Specific Configuration (Only for Projects Using CameraX or library with CameraX)
Some clients include third-party Android libraries in their Flutter project that also depend on CameraX.
Examples include libraries for:
• Document scanning
• Face or liveness detection
• Vision or barcode scanning
• Custom camera implementations
These libraries may override the CameraX versions required by the MetaMap Flutter plugin, which can lead to runtime crashes, camera not opening, or the selfie capture button not working.
To avoid these conflicts, merchants who use ANY dependency that includes CameraX must explicitly force the CameraX versions inside the root android/build.gradle file.
✅ Required Configuration (Only If Your Project Uses CameraX Libraries)
Add the following inside the subprojects block of:
<YOUR_PROJECT>/android/build.gradle
Example: Correct Placement
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
// Other configuration …
configurations.all {
resolutionStrategy {
force "androidx.camera:camera-core:1.4.0"
force "androidx.camera:camera-camera2:1.4.0"
force "androidx.camera:camera-lifecycle:1.4.0"
force "androidx.camera:camera-view:1.4.0"
force "androidx.camera:camera-extensions:1.4.0"
}
}
}
Updated 9 days ago