diff --git a/unifiedpush/lib/unifiedpush.dart b/unifiedpush/lib/unifiedpush.dart index fdb51f3..a78d668 100644 --- a/unifiedpush/lib/unifiedpush.dart +++ b/unifiedpush/lib/unifiedpush.dart @@ -62,15 +62,17 @@ class UnifiedPush { } static Future registerApp( - [String instance = defaultInstance, List? features]) async { - UnifiedPushPlatform.instance.registerApp(instance, features ?? []); + [String instance = defaultInstance, + List? features = const []]) async { + await UnifiedPushPlatform.instance.registerApp(instance, features ?? []); } static Future unregister([String instance = defaultInstance]) async { - UnifiedPushPlatform.instance.unregister(instance); + await UnifiedPushPlatform.instance.unregister(instance); } - static Future> getDistributors([List? features]) async { + static Future> getDistributors( + [List? features = const []]) async { return await UnifiedPushPlatform.instance.getDistributors(features ?? []); } @@ -79,6 +81,6 @@ class UnifiedPush { } static Future saveDistributor(String distributor) async { - UnifiedPushPlatform.instance.saveDistributor(distributor); + await UnifiedPushPlatform.instance.saveDistributor(distributor); } }