Skip to content

Commit

Permalink
Add missing await for async tasks
Browse files Browse the repository at this point in the history
Co-authored-by: The one with the braid <[email protected]>
  • Loading branch information
p1gp1g and TheOneWithTheBraid committed Aug 28, 2024
1 parent f81e4b5 commit d0277e9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions unifiedpush/lib/unifiedpush.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ class UnifiedPush {
}

static Future<void> registerApp(
[String instance = defaultInstance, List<String>? features]) async {
UnifiedPushPlatform.instance.registerApp(instance, features ?? []);
[String instance = defaultInstance,
List<String>? features = const []]) async {
await UnifiedPushPlatform.instance.registerApp(instance, features ?? []);
}

static Future<void> unregister([String instance = defaultInstance]) async {
UnifiedPushPlatform.instance.unregister(instance);
await UnifiedPushPlatform.instance.unregister(instance);
}

static Future<List<String>> getDistributors([List<String>? features]) async {
static Future<List<String>> getDistributors(
[List<String>? features = const []]) async {
return await UnifiedPushPlatform.instance.getDistributors(features ?? []);
}

Expand All @@ -79,6 +81,6 @@ class UnifiedPush {
}

static Future<void> saveDistributor(String distributor) async {
UnifiedPushPlatform.instance.saveDistributor(distributor);
await UnifiedPushPlatform.instance.saveDistributor(distributor);
}
}

0 comments on commit d0277e9

Please sign in to comment.