add missing type parameter on methods (#22096)
This commit is contained in:
committed by
GitHub
parent
48fb726b01
commit
f62afdcf57
@@ -146,7 +146,7 @@ Future<Null> main(List<String> arguments) async {
|
||||
}
|
||||
|
||||
String quote(String arg) => arg.contains(' ') ? "'$arg'" : arg;
|
||||
print('Executing: (cd dev/docs ; $pubExecutable ${dartdocArgs.map(quote).join(' ')})');
|
||||
print('Executing: (cd dev/docs ; $pubExecutable ${dartdocArgs.map<String>(quote).join(' ')})');
|
||||
|
||||
process = await Process.start(
|
||||
pubExecutable,
|
||||
@@ -302,7 +302,7 @@ void putRedirectInOldIndexLocation() {
|
||||
}
|
||||
|
||||
List<String> findPackageNames() {
|
||||
return findPackages().map((FileSystemEntity file) => path.basename(file.path)).toList();
|
||||
return findPackages().map<String>((FileSystemEntity file) => path.basename(file.path)).toList();
|
||||
}
|
||||
|
||||
/// Finds all packages in the Flutter SDK
|
||||
@@ -350,8 +350,8 @@ void printStream(Stream<List<int>> stream, { String prefix = '', List<Pattern> f
|
||||
assert(prefix != null);
|
||||
assert(filter != null);
|
||||
stream
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (!filter.any((Pattern pattern) => line.contains(pattern)))
|
||||
print('$prefix$line'.trim());
|
||||
|
||||
@@ -135,7 +135,7 @@ String _jsonToMap(dynamic json) {
|
||||
}
|
||||
|
||||
if (json is Iterable)
|
||||
return '<dynamic>[${json.map(_jsonToMap).join(',')}]';
|
||||
return '<dynamic>[${json.map<String>(_jsonToMap).join(',')}]';
|
||||
|
||||
if (json is Map<String, dynamic>) {
|
||||
final StringBuffer buffer = StringBuffer('<String, dynamic>{');
|
||||
|
||||
@@ -202,7 +202,7 @@ String generateTranslationBundles() {
|
||||
///
|
||||
/// * [getTranslation], whose documentation describes these values.
|
||||
final Set<String> kSupportedLanguages = HashSet<String>.from(const <String>[
|
||||
${languageCodes.map((String value) => " '$value', // ${describeLocale(value)}").toList().join('\n')}
|
||||
${languageCodes.map<String>((String value) => " '$value', // ${describeLocale(value)}").toList().join('\n')}
|
||||
]);
|
||||
|
||||
/// Creates a [GlobalMaterialLocalizations] instance for the given `locale`.
|
||||
|
||||
@@ -105,7 +105,7 @@ void main(List<String> args) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
final List<int> parts = match.groups(<int>[1, 2, 3]).map(int.parse).toList();
|
||||
final List<int> parts = match.groups(<int>[1, 2, 3]).map<int>(int.parse).toList();
|
||||
|
||||
if (match.group(4) == '0') {
|
||||
print('This commit has already been released, as version ${parts.join(".")}.');
|
||||
|
||||
@@ -29,7 +29,7 @@ void checkCwdIsRepoRoot(String commandName) {
|
||||
String camelCase(String locale) {
|
||||
return locale
|
||||
.split('_')
|
||||
.map((String part) => part.substring(0, 1).toUpperCase() + part.substring(1).toLowerCase())
|
||||
.map<String>((String part) => part.substring(0, 1).toUpperCase() + part.substring(1).toLowerCase())
|
||||
.join('');
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ Future<void> precacheLanguageAndRegionTags() async {
|
||||
final HttpClient client = HttpClient();
|
||||
final HttpClientRequest request = await client.getUrl(Uri.parse(registry));
|
||||
final HttpClientResponse response = await request.close();
|
||||
final String body = (await response.transform(utf8.decoder).toList()).join('');
|
||||
final String body = (await response.transform<String>(utf8.decoder).toList()).join('');
|
||||
client.close(force: true);
|
||||
final List<Map<String, List<String>>> sections = body.split('%%').skip(1).map<Map<String, List<String>>>(_parseSection).toList();
|
||||
for (Map<String, List<String>> section in sections) {
|
||||
|
||||
@@ -199,9 +199,9 @@ String regenerateIconsFile(String iconData, String codepointData) {
|
||||
|
||||
String generateIconDeclarations(String codepointData) {
|
||||
return LineSplitter.split(codepointData)
|
||||
.map((String l) => l.trim())
|
||||
.map<String>((String l) => l.trim())
|
||||
.where((String l) => l.isNotEmpty)
|
||||
.map(getIconDeclaration)
|
||||
.map<String>(getIconDeclaration)
|
||||
.join();
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ class SvgPath {
|
||||
|
||||
SvgPath applyTransform(_Transform transform) {
|
||||
final List<SvgPathCommand> transformedCommands =
|
||||
commands.map((SvgPathCommand c) => c.applyTransform(transform)).toList();
|
||||
commands.map<SvgPathCommand>((SvgPathCommand c) => c.applyTransform(transform)).toList();
|
||||
return SvgPath(id, transformedCommands, opacity: opacity * transform.opacity);
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ class SvgPathCommandBuilder {
|
||||
SvgPathCommand build(String type, List<Point<double>> points) {
|
||||
List<Point<double>> absPoints = points;
|
||||
if (_isRelativeCommand(type)) {
|
||||
absPoints = points.map((Point<double> p) => p + lastPoint).toList();
|
||||
absPoints = points.map<Point<double>>((Point<double> p) => p + lastPoint).toList();
|
||||
}
|
||||
|
||||
if (type == 'M' || type == 'm')
|
||||
|
||||
Reference in New Issue
Block a user