formx_sdk_flutter
Using FormX SDK within Flutter application.
Platform Support
| Android | iOS | MacOS | Web | Linux | Windows |
|---|---|---|---|---|---|
| ✅(SDK 26+) | ✅ (iOS 14.0+) | ❌ | ❌ | ❌ | ❌ |
Installation
In the dependencies: section of your pubspec.yaml, add the following line:
dependencies:
formx_sdk_flutter: ^1.0.2
Setup
Android
- Set the
minSdkVersioninandroid/app/build.gradle:
android {
defaultConfig {
minSdkVersion 26
}
}
- Replace base activity with
FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
}
iOS
- Update
Podfilewith:
target 'Runner' do
....skiped...
pod 'FormX', :git => 'https://github.com/oursky/formx-sdk.git', tag: '0.3.0'
....skiped...
- Set minimum deployments to
14.0
Sample Usage
FormXCameraView
A native camera view to detect documents
- Obtain camera permission:
To use FormXCameraView, Camera permission must be granted. Recommend to use flutter plugin like permission_handler to handle it.
- Using
FormXCameraViewwidget in flutter app:
Scaffold(
body: _cameraPermissionStatus == PermissionStatus.granted
? FormXCameraView(
controller: _controller,
onClose: _onCloseCamera,
onCaptured: _onCaptured,
onCaptureError: _onCaptureError,
)
...
)
For complete tutorial please refer to example app doc