Upgrading version

We've listed the breaking changes between the two latest major versions to make your upgrading process easier.

Start method

From now, you can start Shake from Dart code for both Android and iOS by calling Shake.start() method. Client id and client secret keys are passed as parameters of Shake.start() method instead in .xml and .plist files.

Use:

main.dart
import 'package:shake_flutter/shake_flutter.dart';
void initializeShake() {
Shake.start('client-id', 'client-secret');
}

Instead:

AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.shakebugs.APIClientID"
android:value="your-api-client-id" />
<meta-data
android:name="com.shakebugs.APIClientSecret"
android:value="your-api-client-secret" />
</application>
</manifest>
Info.plist
<?xml version="1.0" encoding="utf-8" ?>
<plist version="1.0">
<dict>
<key>Shake</key>
<dict>
<key>APIClientID</key>
<string>your-api-client-id</string>
<key>APIClientSecret</key>
<string>your-api-client-secret</string>
</dict>
</dict>
</plist>
main.dart
import 'package:shake_flutter/shake_flutter.dart';
void initializeShake() {
Shake.start();
}

Quick facts

Quick facts are removed from SDK in favor of Metadata.

Use:

main.dart
import 'package:shake_flutter/shake_flutter.dart';
void attachData(User user) {
Shake.setMetadata('userId', user.id);
Shake.setMetadata('userName', user.name);
}

Instead:

main.dart
import 'package:shake_flutter/shake_flutter.dart';
void attachData(User user) {
Shake.setShakeReportData('userId: ' + user.id + ' userName: ' + user.name, []);
}

Note that methods for sending silent reports and attaching files don't require quick facts anymore.