diff --git a/tool/grind.dart b/tool/grind.dart index b96e311224..e3a5a0db63 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -46,7 +46,7 @@ colors() async { // Get color file from flutter. HttpClientRequest request = await new HttpClient().getUrl(Uri.parse(kUrl)); HttpClientResponse response = await request.close(); - List data = await response.transform(utf8.decoder).toList(); + List data = await utf8.decoder.bind(response).toList(); // Remove an import and define the Color class. String str = data.join(''); diff --git a/tool/icons/update_icons.dart b/tool/icons/update_icons.dart index 1273edf1d0..49233e1da0 100644 --- a/tool/icons/update_icons.dart +++ b/tool/icons/update_icons.dart @@ -39,7 +39,7 @@ void main() async { Future downloadUrl(String url) async { HttpClientRequest request = await new HttpClient().getUrl(Uri.parse(url)); HttpClientResponse response = await request.close(); - List data = await response.transform(utf8.decoder).toList(); + List data = await utf8.decoder.bind(response).toList(); return data.join(''); } diff --git a/tool/plugin/lib/plugin.dart b/tool/plugin/lib/plugin.dart index ac15a27c73..20c64f442e 100644 --- a/tool/plugin/lib/plugin.dart +++ b/tool/plugin/lib/plugin.dart @@ -131,9 +131,8 @@ Future genPluginXml(BuildSpec spec, String destDir, String path) async { dest.writeln( ""); dest.writeln(); - await new File(p.join(rootPath, 'resources', templatePath)) - .openRead() - .transform(utf8.decoder) + await utf8.decoder + .bind(new File(p.join(rootPath, 'resources', templatePath)).openRead()) .transform(new LineSplitter()) .forEach((l) => dest.writeln(substituteTemplateVariables(l, spec))); await dest.close();