Skip to content

Commit 068f51e

Browse files
committed
Added default value to initSdk params
1 parent 7a638a4 commit 068f51e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Versions
2+
3+
## 5.2.0+2
4+
- added default values to `initSdk` params
5+
26
## 5.2.0+1
37
- Removed the use of RxDart
48
- Checked that the streams are not closed before sending events
59

6-
710
## 5.2.0
811
- AppsFlyer sdk version is updated to v5.2.0
912
- Switched `StreamController` to `BehaviourSubject` to fix bad state related to unclosed streams

example/lib/home_container.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class _HomeContainerState extends State<HomeContainer> {
4343
padding: EdgeInsets.only(top: AppConstants.TOP_PADDING),
4444
),
4545
StreamBuilder<dynamic>(
46-
stream: widget.onData.asBroadcastStream(),
46+
stream: widget.onData?.asBroadcastStream(),
4747
builder:
4848
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
4949
return TextBorder(
@@ -58,7 +58,7 @@ class _HomeContainerState extends State<HomeContainer> {
5858
padding: EdgeInsets.only(top: 12.0),
5959
),
6060
StreamBuilder<dynamic>(
61-
stream: widget.onAttribution.asBroadcastStream(),
61+
stream: widget.onAttribution?.asBroadcastStream(),
6262
builder:
6363
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
6464
return TextBorder(

lib/src/appsflyer_sdk.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ class AppsflyerSdk {
141141

142142
///initialize the SDK, using the options initialized from the constructor|
143143
Future<dynamic> initSdk(
144-
{bool registerConversionDataCallback,
145-
bool registerOnAppOpenAttributionCallback}) async {
144+
{bool registerConversionDataCallback = false,
145+
bool registerOnAppOpenAttributionCallback = false}) async {
146146
return Future.delayed(Duration(seconds: 0)).then((_) {
147147
if (registerConversionDataCallback) _registerConversionDataCallback();
148148
if (registerOnAppOpenAttributionCallback)

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: appsflyer_sdk
22
description: A Flutter plugin for AppsFlyer SDK. Supports iOS and Android.
3-
version: 5.2.0+1
3+
version: 5.2.0+2
44
homepage: https://github.com/AppsFlyerSDK/flutter_appsflyer_sdk
55

66
environment:

0 commit comments

Comments
 (0)