diff --git a/lib/onesignal.dart b/lib/onesignal.dart index 9be880dd..f6f68e97 100644 --- a/lib/onesignal.dart +++ b/lib/onesignal.dart @@ -266,23 +266,23 @@ class OneSignal { Future _handleMethod(MethodCall call) async { if (call.method == 'OneSignal#handleReceivedNotification' && this._onReceivedNotification != null) { - return this._onReceivedNotification( + this._onReceivedNotification( OSNotification(call.arguments.cast())); } else if (call.method == 'OneSignal#handleOpenedNotification' && this._onOpenedNotification != null) { - return this._onOpenedNotification( + this._onOpenedNotification( OSNotificationOpenedResult(call.arguments.cast())); } else if (call.method == 'OneSignal#subscriptionChanged' && this._onSubscriptionChangedHandler != null) { - return this._onSubscriptionChangedHandler( + this._onSubscriptionChangedHandler( OSSubscriptionStateChanges(call.arguments.cast())); } else if (call.method == 'OneSignal#permissionChanged' && this._onPermissionChangedHandler != null) { - return this._onPermissionChangedHandler( + this._onPermissionChangedHandler( OSPermissionStateChanges(call.arguments.cast())); } else if (call.method == 'OneSignal#emailSubscriptionChanged' && this._onEmailSubscriptionChangedHandler != null) { - return this._onEmailSubscriptionChangedHandler( + this._onEmailSubscriptionChangedHandler( OSEmailSubscriptionStateChanges( call.arguments.cast())); }