flutter_slam_sdk 0.0.8
flutter_slam_sdk: ^0.0.8 copied to clipboard
A Flutter wrapper for the Combain Slam SDK.
Combain Slam SDK Flutter Plugin #
This plugin is a wrapper for the Combain Slam SDK. It provides a simple way to integrate the SDK into your Flutter app.
Getting Started #
Installation #
To install the SDK you first need to edit your build.gradle for your android project. Open the build.gradle located here:
.
├── README.md
├── ...
└── android/
├── build.gradle <-
├── app/
└── ...
Then add this code at the top:
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://gitlab.com/api/v4/projects/3194773/packages/maven"
}
}
}
Then you need to change the minSdk version to 28 and the ext.kotlin_version to 1.9.21
ext.kotlin_version = '1.9.21'
...
defaultConfig {
...
minSdk = 28
}
For a complete example see the example build.gradle
Then run:
flutter pub add flutter_slam_sdk
Using SDK #
This is all the code needed to start receiving indoor location updates from the Combain Slam SDK.
FlutterSlamSDK slamSdk = FlutterSlamSDK(slamApiKey);
slamSdk.start();
slamSdk.addLocationUpdateListener(locationUpdateListener);
Releasing #
There is some extra configurations needed to release an app with the SlamSDK. Shrinking is not going to work with the SlamSDK in its current state.
Follow this guide from Flutter: https://docs.flutter.dev/deployment
With the following changes:
APK
For APK you want to modify build command like this:
flutter build apk --no-shrink
AAB
For AAB you want to modify build command like this:
flutter build appbundle --no-shrink
Demo #
For a demo project see https://gitlab.combain.com/Hugo-Persson/flutter-slam-sdk-demo-app