Migrate pub in flutter_tools to null safety (#80548)
This commit is contained in:
@@ -2,36 +2,33 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:flutter_tools/src/base/io.dart';
|
||||
import 'package:flutter_tools/src/dart/pub.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
class ThrowingPub implements Pub {
|
||||
@override
|
||||
Future<void> batch(List<String> arguments, {
|
||||
PubContext context,
|
||||
String directory,
|
||||
MessageFilter filter,
|
||||
String failureMessage = 'pub failed',
|
||||
bool retry,
|
||||
bool showTraceForErrors,
|
||||
PubContext? context,
|
||||
String? directory,
|
||||
MessageFilter? filter,
|
||||
String? failureMessage = 'pub failed',
|
||||
bool? retry,
|
||||
bool? showTraceForErrors,
|
||||
}) {
|
||||
throw UnsupportedError('Attempted to invoke pub during test.');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> get({
|
||||
PubContext context,
|
||||
String directory,
|
||||
PubContext? context,
|
||||
String? directory,
|
||||
bool skipIfAbsent = false,
|
||||
bool upgrade = false,
|
||||
bool offline = false,
|
||||
bool checkLastModified = true,
|
||||
bool skipPubspecYamlCheck = false,
|
||||
bool generateSyntheticPackage = false,
|
||||
String flutterRootOverride,
|
||||
String? flutterRootOverride,
|
||||
bool checkUpToDate = false,
|
||||
}) {
|
||||
throw UnsupportedError('Attempted to invoke pub during test.');
|
||||
@@ -40,8 +37,8 @@ class ThrowingPub implements Pub {
|
||||
@override
|
||||
Future<void> interactively(
|
||||
List<String> arguments, {
|
||||
String directory,
|
||||
@required Stdio stdio,
|
||||
String? directory,
|
||||
required Stdio stdio,
|
||||
bool touchesPackageConfig = false,
|
||||
bool generateSyntheticPackage = false,
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user