[tool] Update Dart SDK version (#4402)

Since the tool only needs to support back to Flutter 3.3 (the oldest version we still run CI with), this updates the tool to the corresponding minimum Dart version.

This allows the use of `super` parameters, so `dart fix --apply` was run to convert them all (and remove all the includes that were only needed for setting default values).

Also opportunistically cleans up a bunch of unnecessary, very old `dart:async` includes. (Other than those removals, the changes here are all `dart fix`-generated.)
This commit is contained in:
stuartmorgan
2023-07-08 10:31:19 -04:00
committed by GitHub
parent 3eaad3d0d1
commit f1f0f240db
33 changed files with 124 additions and 235 deletions

View File

@ -2,17 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:file/file.dart';
import 'package:platform/platform.dart';
import 'common/core.dart';
import 'common/package_looping_command.dart';
import 'common/plugin_utils.dart';
import 'common/process_runner.dart';
import 'common/repository_package.dart';
const int _exitNoPlatformFlags = 2;
@ -25,10 +22,10 @@ const int _chromeDriverPort = 4444;
class DriveExamplesCommand extends PackageLoopingCommand {
/// Creates an instance of the drive command.
DriveExamplesCommand(
Directory packagesDir, {
ProcessRunner processRunner = const ProcessRunner(),
Platform platform = const LocalPlatform(),
}) : super(packagesDir, processRunner: processRunner, platform: platform) {
super.packagesDir, {
super.processRunner,
super.platform,
}) {
argParser.addFlag(platformAndroid,
help: 'Runs the Android implementation of the examples',
aliases: const <String>[platformAndroidAlias]);