Install Shake
Install
Add shake as a dependency to pubspec.yaml.
Run flutter pub get
to download the package.
Then include Shake package in your code
Add Client ID and Secret
Android
Open your AndroidManifest.xml file. Paste this and replace your-api-client-id and your-api-client-secret with the actual values you have in your workspace settings.
iOS
Open your workspace and in the Project Navigator, right click on Info.plist, and Open as › Source code. Paste this but replace your-api-client-id and your-api-client-secret with the actual values you have in your workspace settings.
ProGuard
If you are using code shrinking when building your application, add following ProGuard rule to the proguard-rules.pro file:
note
Building release .apk or .app using flutter build
will run code shrinking by default.
Initialize
To start Shake, enable desired invocation methods and then call Shake.start()
like in the example below.
note
Shake supports post Flutter 1.12 projects. If your project is created with the older version of Flutter, you should migrate your project to the new Android APIs via official guide.
note
Shake supports devices with Android 7.0 version and higher.