From 2895d71b79b1482c8c1d1de387d04e2a5e667f1e Mon Sep 17 00:00:00 2001 From: Mehmet Fidanboylu Date: Thu, 13 Sep 2018 18:50:21 -0700 Subject: [PATCH] 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... causes failure without the new keyword. --- packages/flutter/lib/src/rendering/editable.dart | 2 ++ packages/flutter_tools/lib/src/commands/daemon.dart | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 5edfb10d50..db62b5ca24 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart @@ -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; diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index 614f30ad23..2a91d94708 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart @@ -184,7 +184,9 @@ abstract class Domain { String toString() => name; void handleCommand(String command, dynamic id, Map args) { - Future.sync(() { + // Remove 'new' once Google catches up to dev4.0 Dart SDK. + //ignore: unnecessary_new + new Future.sync(() { if (_handlers.containsKey(command)) return _handlers[command](args); throw 'command not understood: $name.$command';