Skip to content

Commit

Permalink
Fix for MissingPluginException when using downloadOfflineRegion (#864)
Browse files Browse the repository at this point in the history
* Fix for MissingPluginException when using downloadOfflineRegion

* Fix for [#840](#840)

* Fixed formatting

Co-authored-by: Luis Jara Castillo <luis.jara.castillo@ceisufro.cl>
  • Loading branch information
LJaraCastillo and Luis Jara Castillo authored Jan 21, 2022
1 parent 7d3c5c9 commit 2824a75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/global.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ Future<OfflineRegion> downloadOfflineRegion(
String channelName =
'downloadOfflineRegion_${DateTime.now().microsecondsSinceEpoch}';

final result =
_globalChannel.invokeMethod('downloadOfflineRegion', <String, dynamic>{
final result = await _globalChannel
.invokeMethod('downloadOfflineRegion', <String, dynamic>{
'accessToken': accessToken,
'channelName': channelName,
'definition': definition.toMap(),
Expand Down Expand Up @@ -153,5 +153,5 @@ Future<OfflineRegion> downloadOfflineRegion(
});
}

return OfflineRegion.fromMap(json.decode(await result));
return OfflineRegion.fromMap(json.decode(result));
}

0 comments on commit 2824a75

Please sign in to comment.