Skip to content

Commit

Permalink
Review comments actioned
Browse files Browse the repository at this point in the history
  • Loading branch information
twometresteve committed Mar 11, 2022
1 parent 20ff939 commit b3e30d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions features/fixtures/app/lib/channels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:flutter/services.dart';
class MazeRunnerChannels {
static const platform = MethodChannel('com.bugsnag.mazeRunner/platform');

static Future<String> getCommand(String commandUrl) {
return platform.invokeMethod("getCommand", {
static Future<String> getCommand(String commandUrl) async {
return await platform.invokeMethod("getCommand", {
"commandUrl": commandUrl,
}).then((value) => value ?? "");
}
Expand Down
2 changes: 1 addition & 1 deletion features/fixtures/app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Command {

factory Command.fromJsonString(String jsonString) {
final map = json.decode(jsonString) as Map<String, dynamic>;
if (!map.containsKey('action')) {
if (map['action'] == null) {
throw Exception('MazeRunner commands must have an action');
}
return Command(
Expand Down

0 comments on commit b3e30d0

Please sign in to comment.