Unverified Commit 2895d71b authored by Mehmet Fidanboylu's avatar Mehmet Fidanboylu Committed by GitHub

Make Flutter repo Dart SDK 2.1-dev3.1 compatible (#21853)

This is a blocker for Google roll since we are not at dev4.0:
- Future is not yet part of dart:core.
- Future.sync().then<dynamic>... causes failure without the new keyword.
parent 069cddaa
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//ignore: Remove this once Google catches up with dev.4 Dart.
import 'dart:async';
import 'dart:math' as math;
import 'dart:ui' as ui show TextBox;
......
......@@ -184,7 +184,9 @@ abstract class Domain {
String toString() => name;
void handleCommand(String command, dynamic id, Map<String, dynamic> args) {
Future<dynamic>.sync(() {
// Remove 'new' once Google catches up to dev4.0 Dart SDK.
//ignore: unnecessary_new
new Future<dynamic>.sync(() {
if (_handlers.containsKey(command))
return _handlers[command](args);
throw 'command not understood: $name.$command';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment