Using FormX SDK within Flutter application.
Android | iOS | MacOS | Web | Linux | Windows |
---|---|---|---|---|---|
✅(SDK 26+) | ✅ (iOS 14.0+) | ❌ | ❌ | ❌ | ❌ |
In the dependencies: section of your pubspec.yaml, add the following line:
dependencies:
formx_sdk_flutter: ^1.0.2
Android
- Set the
minSdkVersion
inandroid/app/build.gradle
:
android {
defaultConfig {
minSdkVersion 26
}
}
- Replace base activity with
FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
}
iOS
- Update
Podfile
with:
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
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
FormXCameraView
widget 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
-
Prepare release note (see commit c50ec90)
-
Publish via flutter commands (see https://docs.flutter.dev/packages-and-plugins/developing-packages#publish)