add missing trailing commas in list/set/map literals (#102585)

This commit is contained in:
Alexandre Ardhuin
2022-04-27 09:15:35 +02:00
committed by GitHub
parent 0b80f08cf0
commit 07f1c20474
271 changed files with 1236 additions and 1141 deletions

View File

@@ -380,7 +380,7 @@ class AndroidDevice extends Device {
'packages',
if (userIdentifier != null)
...<String>['--user', userIdentifier],
app.id
app.id,
]);
return LineSplitter.split(listOut.stdout).contains('package:${app.id}');
} on Exception catch (error) {
@@ -447,7 +447,7 @@ class AndroidDevice extends Device {
'-r',
if (userIdentifier != null)
...<String>['--user', userIdentifier],
app.applicationPackage.path
app.applicationPackage.path,
]));
status.stop();
// Some versions of adb exit with exit code 0 even on failure :(
@@ -494,7 +494,8 @@ class AndroidDevice extends Device {
'uninstall',
if (userIdentifier != null)
...<String>['--user', userIdentifier],
app.id]),
app.id,
]),
throwOnError: true,
);
uninstallOut = uninstallResult.stdout;
@@ -805,7 +806,7 @@ class AndroidDevice extends Device {
RunResult output;
try {
output = await runAdbCheckedAsync(<String>[
'shell', '-x', 'logcat', '-v', 'time', '-t', '1'
'shell', '-x', 'logcat', '-v', 'time', '-t', '1',
]);
} on Exception catch (error) {
_logger.printError('Failed to extract the most recent timestamp from the Android log: $error.');

View File

@@ -158,7 +158,7 @@ class AndroidEmulator extends Emulator {
'-avd',
id,
if (coldBoot)
'-no-snapshot-load'
'-no-snapshot-load',
];
final Process process = await _processUtils.start(command);

View File

@@ -589,7 +589,7 @@ class AndroidGradleBuilder implements AndroidBuilder {
'-Pflutter-root=$flutterRoot',
'-Poutput-dir=${outputDirectory.path}',
'-Pis-plugin=${manifest.isPlugin}',
'-PbuildNumber=$buildNumber'
'-PbuildNumber=$buildNumber',
];
if (_logger.isVerbose) {
command.add('--full-stacktrace');
@@ -851,15 +851,15 @@ Iterable<String> listApkPaths(
<String>[
'app',
getNameForAndroidArch(androidArch),
...apkPartialName
].join('-')
...apkPartialName,
].join('-'),
];
}
return <String>[
<String>[
'app',
...apkPartialName,
].join('-')
].join('-'),
];
}

View File

@@ -467,7 +467,7 @@ class _SymbolNode {
Map<String, Object?> toJson() {
final Map<String, Object?> json = <String, Object?>{
'n': name,
'value': byteSize
'value': byteSize,
};
final List<Map<String, Object?>> childrenAsJson = <Map<String, Object?>>[];
for (final _SymbolNode child in children) {

View File

@@ -197,7 +197,7 @@ class AOTSnapshotter {
// Faster async/await
if (shouldSplitDebugInfo) ...<String>[
'--dwarf-stack-traces',
'--save-debugging-info=${_fileSystem.path.join(splitDebugInfo!, debugFilename)}'
'--save-debugging-info=${_fileSystem.path.join(splitDebugInfo!, debugFilename)}',
],
if (dartObfuscation)
'--obfuscate',

View File

@@ -901,7 +901,7 @@ class BufferLogger extends Logger {
void sendEvent(String name, [Map<String, dynamic>? args]) {
_events.write(json.encode(<String, Object?>{
'name': name,
'args': args
'args': args,
}));
}
}

View File

@@ -17,7 +17,7 @@ final Uint32List _noise = Uint32List.fromList(<int>[
0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92,
0xffeff47d, 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391,
]);
/// Per-round shift amounts.
@@ -25,7 +25,7 @@ const List<int> _shiftAmounts = <int>[
07, 12, 17, 22, 07, 12, 17, 22, 07, 12, 17, 22, 07, 12, 17, 22, 05, 09, 14,
20, 05, 09, 14, 20, 05, 09, 14, 20, 05, 09, 14, 20, 04, 11, 16, 23, 04, 11,
16, 23, 04, 11, 16, 23, 04, 11, 16, 23, 06, 10, 15, 21, 06, 10, 15, 21, 06,
10, 15, 21, 06, 10, 15, 21
10, 15, 21, 06, 10, 15, 21,
];
/// A bitmask that limits an integer to 32 bits.

View File

@@ -265,7 +265,7 @@ class CopyAssets extends Target {
@override
List<String> get depfiles => const <String>[
'flutter_assets.d'
'flutter_assets.d',
];
@override

View File

@@ -44,7 +44,7 @@ class CopyFlutterBundle extends Target {
@override
List<String> get depfiles => <String>[
'flutter_assets.d'
'flutter_assets.d',
];
@override

View File

@@ -335,7 +335,7 @@ abstract class UnpackIOS extends Target {
'lipo',
frameworkBinaryPath,
'-verify_arch',
...archList
...archList,
]);
if (verifyResult.exitCode != 0) {
@@ -444,7 +444,7 @@ abstract class IosAssetBundle extends Target {
@override
List<Source> get outputs => const <Source>[
Source.pattern('{OUTPUT_DIR}/App.framework/App'),
Source.pattern('{OUTPUT_DIR}/App.framework/Info.plist')
Source.pattern('{OUTPUT_DIR}/App.framework/Info.plist'),
];
@override

View File

@@ -71,12 +71,12 @@ class GenerateLocalizationsTarget extends Target {
configFile,
if (inputs != null)
for (Object inputFile in inputs.whereType<Object>())
environment.fileSystem.file(inputFile)
environment.fileSystem.file(inputFile),
],
<File>[
if (outputs != null)
for (Object outputFile in outputs.whereType<Object>())
environment.fileSystem.file(outputFile)
environment.fileSystem.file(outputFile),
],
);
depfileService.writeToFile(

View File

@@ -93,7 +93,7 @@ abstract class UnpackMacOS extends Target {
'lipo',
frameworkBinaryPath,
'-verify_arch',
...archList
...archList,
]);
if (verifyResult.exitCode != 0) {

View File

@@ -179,12 +179,12 @@ class AssembleCommand extends FlutterCommand {
final String name = argumentResults.rest.first;
final Map<String, Target> targetMap = <String, Target>{
for (final Target target in _kDefaultTargets)
target.name: target
target.name: target,
};
final List<Target> results = <Target>[
for (final String targetName in argumentResults.rest)
if (targetMap.containsKey(targetName))
targetMap[targetName]!
targetMap[targetName]!,
];
if (results.isEmpty) {
throwToolExit('No target named "$name" defined.');
@@ -386,8 +386,8 @@ void writePerformanceData(Iterable<PerformanceMeasurement> measurements, File ou
'skipped': measurement.skipped,
'succeeded': measurement.succeeded,
'elapsedMilliseconds': measurement.elapsedMilliseconds,
}
]
},
],
};
if (!outFile.parent.existsSync()) {
outFile.parent.createSync(recursive: true);

View File

@@ -490,7 +490,7 @@ end
podProduct as Directory,
simulatorBuildConfiguration
.childDirectory(builtProduct.basename)
.childDirectory(podFrameworkName)
.childDirectory(podFrameworkName),
];
await _produceXCFramework(frameworks, binaryName, modeDirectory);
@@ -520,10 +520,10 @@ end
entity.basename.endsWith('dSYM'))
.map((FileSystemEntity entity) =>
<String>['-debug-symbols', entity.path])
.expand<String>((List<String> parameter) => parameter)
.expand<String>((List<String> parameter) => parameter),
],
'-output',
outputDirectory.childDirectory('$frameworkBinaryName.xcframework').path
outputDirectory.childDirectory('$frameworkBinaryName.xcframework').path,
];
final RunResult xcframeworkResult = await globals.processUtils.run(

View File

@@ -665,7 +665,7 @@ Your $application code is in $relativeAppMain.
List<String> _getSupportedPlatformsFromTemplateContext(Map<String, dynamic> templateContext) {
return <String>[
for (String platform in kAllCreatePlatforms)
if (templateContext[platform] == true) platform
if (templateContext[platform] == true) platform,
];
}

View File

@@ -529,7 +529,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
final String exampleOrDefault = <String>[
if (example != null) 'example: $example',
if (defaultsTo != null) 'empty for $defaultsTo'
if (defaultsTo != null) 'empty for $defaultsTo',
].join(', ');
if (exampleOrDefault.isNotEmpty) {
@@ -710,7 +710,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'BatchMode=yes',
if (ipv6) '-6',
r'${localPath}',
'$sshTarget:/tmp/\${appName}'
'$sshTarget:/tmp/\${appName}',
],
uninstallCommand: <String>[
@@ -718,7 +718,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'BatchMode=yes',
if (ipv6) '-6',
sshTarget,
r'rm -rf "/tmp/${appName}"'
r'rm -rf "/tmp/${appName}"',
],
runDebugCommand: <String>[
@@ -726,7 +726,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'BatchMode=yes',
if (ipv6) '-6',
sshTarget,
remoteRunDebugCommand
remoteRunDebugCommand,
],
forwardPortCommand: usePortForwarding
@@ -737,7 +737,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
if (ipv6) '-6',
'-L', '$formattedLoopbackIp:\${hostPort}:$formattedLoopbackIp:\${devicePort}',
sshTarget,
"echo 'Port forwarding success'; read"
"echo 'Port forwarding success'; read",
]
: null,
forwardPortSuccessRegex: usePortForwarding
@@ -750,7 +750,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
'-o', 'BatchMode=yes',
if (ipv6) '-6',
sshTarget,
screenshotCommand
screenshotCommand,
]
: null
);
@@ -762,7 +762,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
if (ipv6) '-6',
'-n', '1',
'-w', '500',
targetStr
targetStr,
],
explicitPingSuccessRegex: true,
pingSuccessRegex: RegExp(r'[<=]\d+ms')
@@ -774,7 +774,7 @@ class CustomDevicesAddCommand extends CustomDevicesCommandBase {
if (ipv6) '-6',
'-c', '1',
'-w', '1',
targetStr
targetStr,
],
explicitPingSuccessRegex: true,
pingSuccessRegex: null

View File

@@ -1103,7 +1103,7 @@ Future<Map<String, dynamic>> _deviceToMap(Device device) async {
'flutterExit': device.supportsFlutterExit,
'hardwareRendering': await device.supportsHardwareRendering,
'startPaused': device.supportsStartPaused,
}
},
};
}

View File

@@ -51,7 +51,7 @@ class FormatCommand extends FlutterCommand {
if (arg == '--dry-run' || arg == '-n')
'--output=none'
else
arg
arg,
]);
}

View File

@@ -87,7 +87,7 @@ class PrecacheCommand extends FlutterCommand {
'android_gen_snapshot',
'android_maven',
'android_internal_build',
]
],
};
/// Returns a reverse mapping of _expandedArtifacts, from child artifact name
@@ -96,7 +96,7 @@ class PrecacheCommand extends FlutterCommand {
return <String, String>{
for (final MapEntry<String, List<String>> entry in _expandedArtifacts.entries)
for (final String childArtifactName in entry.value)
childArtifactName: entry.key
childArtifactName: entry.key,
};
}

View File

@@ -277,7 +277,7 @@ class TestCommand extends FlutterCommand with DeviceBasedDevelopmentArtifacts {
if (globals.fs.isDirectorySync(path))
..._findTests(globals.fs.directory(path))
else
globals.fs.path.normalize(globals.fs.path.absolute(path))
globals.fs.path.normalize(globals.fs.path.absolute(path)),
];
}

View File

@@ -156,7 +156,7 @@ class CustomDevicePortForwarder extends DevicePortForwarder {
_forwardPortCommand,
<String, String>{
'devicePort': '$devicePort',
'hostPort': '$hostPort'
'hostPort': '$hostPort',
},
additionalReplacementValues: _additionalReplacementValues
);
@@ -394,7 +394,7 @@ class CustomDeviceAppSession {
<String, String>{
'remotePath': '/tmp/',
'appName': packageName,
'engineOptions': _getEngineOptionsForCmdline(debuggingOptions, traceStartup, route)
'engineOptions': _getEngineOptionsForCmdline(debuggingOptions, traceStartup, route),
}
);
@@ -587,7 +587,7 @@ class CustomDevice extends Device {
_config.postBuildCommand!,
<String, String>{
'appName': appName,
'localPath': localPath
'localPath': localPath,
},
additionalReplacementValues: additionalReplacementValues
);
@@ -621,7 +621,7 @@ class CustomDevice extends Device {
final List<String> interpolated = interpolateCommand(
_config.uninstallCommand,
<String, String>{
'appName': appName
'appName': appName,
},
additionalReplacementValues: additionalReplacementValues
);
@@ -657,7 +657,7 @@ class CustomDevice extends Device {
_config.installCommand,
<String, String>{
'localPath': localPath,
'appName': appName
'appName': appName,
},
additionalReplacementValues: additionalReplacementValues
);

View File

@@ -283,7 +283,7 @@ class CustomDeviceConfig {
'ping',
'-w', '1',
'-c', '1',
'raspberrypi'
'raspberrypi',
],
explicitPingSuccessRegex: true
);

View File

@@ -186,7 +186,7 @@ class CustomDevicesConfig {
_kCustomDevicesConfigKey,
<dynamic>[
...?_getDevicesJsonValue(),
config.toJson()
config.toJson(),
]
);
}

View File

@@ -158,7 +158,7 @@ abstract class DeviceManager {
}, onError: (dynamic error, StackTrace stackTrace) {
// Return matches from other discoverers even if one fails.
_logger.printTrace('Ignored error discovering $deviceId: $error');
})
}),
];
// Wait for an exact match, or for all discoverers to return results.
@@ -722,7 +722,7 @@ abstract class Device {
'flutterExit': supportsFlutterExit,
'hardwareRendering': isLocalEmu && await supportsHardwareRendering,
'startPaused': supportsStartPaused,
}
},
};
}

View File

@@ -258,14 +258,14 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
'--no-default-browser-check',
'--no-sandbox',
'--no-first-run',
if (headless) '--headless'
if (headless) '--headless',
],
'perfLoggingPrefs': <String, String>{
'traceCategories':
'devtools.timeline,'
'v8,blink.console,benchmark,blink,'
'blink.user_timing'
}
'v8,blink.console,benchmark,blink,'
'blink.user_timing',
},
},
};
break;
@@ -275,7 +275,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
'browserName': 'firefox',
'moz:firefoxOptions' : <String, dynamic>{
'args': <String>[
if (headless) '-headless'
if (headless) '-headless',
],
'prefs': <String, dynamic>{
'dom.file.createInChild': true,
@@ -285,10 +285,10 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
'media.gmp-provider.enabled': false,
'network.captive-portal-service.enabled': false,
'security.insecure_field_warning.contextual.enabled': false,
'test.currentTimeOffsetSeconds': 11491200
'test.currentTimeOffsetSeconds': 11491200,
},
'log': <String, String>{'level': 'trace'}
}
'log': <String, String>{'level': 'trace'},
},
};
break;
case Browser.edge:
@@ -306,7 +306,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
return <String, dynamic>{
'platformName': 'ios',
'browserName': 'safari',
'safari:useSimulator': true
'safari:useSimulator': true,
};
case Browser.androidChrome:
return <String, dynamic>{
@@ -314,7 +314,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
'platformName': 'android',
'goog:chromeOptions': <String, dynamic>{
'androidPackage': 'com.android.chrome',
'args': <String>['--disable-fullscreen']
'args': <String>['--disable-fullscreen'],
},
};
}

View File

@@ -14,7 +14,7 @@ import 'base/utils.dart';
import 'plugins.dart';
const Set<String> _kValidPluginPlatforms = <String>{
'android', 'ios', 'web', 'windows', 'linux', 'macos'
'android', 'ios', 'web', 'windows', 'linux', 'macos',
};
/// A wrapper around the `flutter` section in the `pubspec.yaml` file.

View File

@@ -58,7 +58,7 @@ class FuchsiaFfx {
'target',
'list',
'--format',
's'
's',
];
final RunResult result = await _processUtils.run(command);
if (result.exitCode != 0) {

View File

@@ -63,7 +63,7 @@ class FuchsiaKernelCompiler {
globals.fs.path.join(outDir, '$appName.dil'),
'--component-name',
appName,
...getBuildInfoFlags(buildInfo: buildInfo, manifestPath: manifestPath)
...getBuildInfoFlags(buildInfo: buildInfo, manifestPath: manifestPath),
];
flags += <String>[
@@ -104,12 +104,12 @@ class FuchsiaKernelCompiler {
// AOT/JIT:
if (buildInfo.usesAot) ...<String>[
'--aot',
'--tfa'
'--tfa',
] else ...<String>[
'--no-link-platform',
'--split-output-by-packages',
'--manifest',
manifestPath
manifestPath,
],
// debug, profile, jit release, release:

View File

@@ -133,7 +133,7 @@ class IOSDevices extends PollingDeviceDiscovery {
Future<List<String>> getDiagnostics() async {
if (!_platform.isMacOS) {
return const <String>[
'Control of iOS devices or simulators only supported on macOS.'
'Control of iOS devices or simulators only supported on macOS.',
];
}

View File

@@ -359,7 +359,7 @@ Future<XcodeBuildResult> buildXcodeProject({
'-resultBundlePath',
tempDir.childFile(_kResultBundlePath).absolute.path,
'-resultBundleVersion',
_kResultBundleVersion
_kResultBundleVersion,
]);
// Don't log analytics for downstream Flutter commands.

View File

@@ -473,7 +473,7 @@ class IOSSimulator extends Device {
if (debuggingOptions.traceSkiaAllowlist != null) '--trace-skia-allowlist="${debuggingOptions.traceSkiaAllowlist}"',
if (dartVmFlags.isNotEmpty) '--dart-flags=$dartVmFlags',
'--observatory-port=${debuggingOptions.hostVmServicePort ?? 0}',
if (route != null) '--route=$route'
if (route != null) '--route=$route',
],
];

View File

@@ -194,7 +194,7 @@ class XcodeProjectInterpreter {
'generic/platform=iOS Simulator',
'-showBuildSettings',
'BUILD_DIR=${_fileSystem.path.absolute(getIosBuildDirectory())}',
...environmentVariablesAsXcodeBuildSettings(_platform)
...environmentVariablesAsXcodeBuildSettings(_platform),
];
try {
// showBuildSettings is reported to occasionally timeout. Here, we give it
@@ -290,7 +290,7 @@ class XcodeProjectInterpreter {
if (!verbose)
'-quiet',
'clean',
...environmentVariablesAsXcodeBuildSettings(_platform)
...environmentVariablesAsXcodeBuildSettings(_platform),
], workingDirectory: _fileSystem.currentDirectory.path);
}

View File

@@ -267,7 +267,7 @@ class WebAssetServer implements AssetReader {
final String result =
await globals.fs.file(uri.toFilePath()).readAsString();
return shelf.Response.ok(result, headers: <String, String>{
HttpHeaders.contentTypeHeader: 'application/javascript'
HttpHeaders.contentTypeHeader: 'application/javascript',
});
}
return innerHandler(request);

View File

@@ -145,7 +145,7 @@ Future<void> _runCmake(String buildModeName, Directory sourceDir, Directory buil
workingDirectory: buildDir.path,
environment: <String, String>{
'CC': 'clang',
'CXX': 'clang++'
'CXX': 'clang++',
},
trace: true,
);

View File

@@ -65,7 +65,7 @@ class LinuxDoctorValidator extends DoctorValidator {
final Map<String, _VersionInfo?> installedVersions = <String, _VersionInfo?>{
// Sort the check to make the call order predictable for unit tests.
for (String binary in _requiredBinaryVersions.keys.toList()..sort())
binary: await _getBinaryVersion(binary)
binary: await _getBinaryVersion(binary),
};
// Determine overall validation level.

View File

@@ -114,7 +114,7 @@ Future<void> buildMacOS({
else
'-quiet',
'COMPILER_INDEX_STORE_ENABLE=NO',
...environmentVariablesAsXcodeBuildSettings(globals.platform)
...environmentVariablesAsXcodeBuildSettings(globals.platform),
],
trace: true,
stdoutErrorMatcher: verboseLogging ? null : _filteredOutput,

View File

@@ -186,11 +186,11 @@ class XCDevice {
final String identifier = match.group(2)!;
if (verb.startsWith('attach')) {
_deviceIdentifierByEvent?.add(<XCDeviceEvent, String>{
XCDeviceEvent.attach: identifier
XCDeviceEvent.attach: identifier,
});
} else if (verb.startsWith('detach')) {
_deviceIdentifierByEvent?.add(<XCDeviceEvent, String>{
XCDeviceEvent.detach: identifier
XCDeviceEvent.detach: identifier,
});
}
}

View File

@@ -84,7 +84,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
static const Map<Channel, String> _lastActiveVersionKeys = <Channel,String>{
Channel.master: 'last-active-master-version',
Channel.beta: 'last-active-beta-version',
Channel.stable: 'last-active-stable-version'
Channel.stable: 'last-active-stable-version',
};
static const String _kBotKey = 'is-bot';
static const String _kLicenseHash = 'license-hash';

View File

@@ -180,7 +180,7 @@ class AndroidPlugin extends PluginPlatform implements NativeOrDartPlugin {
'kotlin',
package.replaceAll('.', _fileSystem.path.separator),
'$pluginClass.kt',
)
),
];
File? mainPluginClass;

View File

@@ -169,7 +169,7 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
Future<List<FlutterDevice>> _devicesWithExtensions(List<FlutterDevice> flutterDevices) async {
final List<FlutterDevice> devices = await Future.wait(<Future<FlutterDevice>>[
for (final FlutterDevice device in flutterDevices) _waitForExtensionsForDevice(device)
for (final FlutterDevice device in flutterDevices) _waitForExtensionsForDevice(device),
]);
return devices.where((FlutterDevice device) => device != null).toList();
}

View File

@@ -614,7 +614,7 @@ class HotRunner extends ResidentRunner {
device.vmService.service.setIsolatePauseMode(isolate.id,
exceptionPauseMode: vm_service.ExceptionPauseMode.kNone),
for (final vm_service.Breakpoint breakpoint in isolate.breakpoints)
device.vmService.service.removeBreakpoint(isolate.id, breakpoint.id)
device.vmService.service.removeBreakpoint(isolate.id, breakpoint.id),
];
await Future.wait(breakpointAndExceptionRemoval);
await device.vmService.service.resume(view.uiIsolate.id);
@@ -1186,7 +1186,7 @@ Future<List<Future<vm_service.ReloadReport>>> _reloadDeviceSources(
isolateRef.id,
pause: pause,
rootLibUri: deviceEntryUri,
)
),
];
}

View File

@@ -153,11 +153,11 @@ abstract class FlutterCommand extends Command<void> {
],
'canvaskit': <String>[
'FLUTTER_WEB_AUTO_DETECT=false',
'FLUTTER_WEB_USE_SKIA=true'
'FLUTTER_WEB_USE_SKIA=true',
],
'html': <String>[
'FLUTTER_WEB_AUTO_DETECT=false',
'FLUTTER_WEB_USE_SKIA=false'
'FLUTTER_WEB_USE_SKIA=false',
],
};

View File

@@ -122,12 +122,12 @@ class Template {
return Template._(
<Directory>[
for (final String name in names)
_templateDirectoryInPackage(name, fileSystem)
_templateDirectoryInPackage(name, fileSystem),
],
<Directory>[
for (final String name in names)
if ((await _templateImageDirectory(name, fileSystem, logger)).existsSync())
await _templateImageDirectory(name, fileSystem, logger)
await _templateImageDirectory(name, fileSystem, logger),
],
fileSystem: fileSystem,
logger: logger,
@@ -304,7 +304,7 @@ class Template {
final List<File> potentials = <File>[
for (final Directory imageSourceDir in imageSourceDirectories)
_fileSystem.file(_fileSystem.path
.join(imageSourceDir.path, relativeDestinationPath.replaceAll(imageTemplateExtension, '')))
.join(imageSourceDir.path, relativeDestinationPath.replaceAll(imageTemplateExtension, ''))),
];
if (potentials.any((File file) => file.existsSync())) {

View File

@@ -367,7 +367,7 @@ class FlutterWebPlatform extends PlatformPlugin {
'width': width.toDouble(),
'height': height.toDouble(),
'scale': 1.0,
}
},
});
bytes = base64.decode(response.result['data'] as String);
} on WipError catch (ex) {

View File

@@ -174,7 +174,7 @@ class FlutterTesterDevice extends Device {
'--disable-service-auth-codes',
if (debuggingOptions.hasObservatoryPort)
'--observatory-port=${debuggingOptions.hostVmServicePort}',
applicationKernelFilePath
applicationKernelFilePath,
];
ProtocolDiscovery? observatoryDiscovery;

View File

@@ -198,7 +198,7 @@ Future<vm_service.VmService> setUpVmService(
return <String, Object>{
'result': <String, Object>{
'type': 'Success',
}
},
};
});
registrationRequests.add(vmService.registerService('reloadSources', 'Flutter Tools'));
@@ -211,7 +211,7 @@ Future<vm_service.VmService> setUpVmService(
return <String, Object>{
'result': <String, Object>{
'type': 'Success',
}
},
};
});
registrationRequests.add(vmService.registerService('hotRestart', 'Flutter Tools'));
@@ -226,7 +226,7 @@ Future<vm_service.VmService> setUpVmService(
'result': <String, Object>{
'type': 'Success',
...versionJson,
}
},
};
});
registrationRequests.add(vmService.registerService('flutterVersion', 'Flutter Tools'));
@@ -258,7 +258,7 @@ Future<vm_service.VmService> setUpVmService(
'result': <String, Object>{
'type': 'Success',
...result.toJson(),
}
},
};
});
registrationRequests.add(vmService.registerService('flutterMemoryInfo', 'Flutter Tools'));
@@ -270,7 +270,7 @@ Future<vm_service.VmService> setUpVmService(
'result': <String, Object>{
'type': 'Success',
'filename': filename,
}
},
};
});
registrationRequests.add(vmService.registerService('flutterGetSkSL', 'Flutter Tools'));
@@ -847,7 +847,7 @@ class FlutterVmService {
final List<FlutterView> views = <FlutterView>[
if (rawViews != null)
for (final Map<String, Object?> rawView in rawViews.whereType<Map<String, Object?>>())
FlutterView.parse(rawView)
FlutterView.parse(rawView),
];
if (views.isNotEmpty || returnEarly) {
return views;

View File

@@ -168,11 +168,11 @@ Future<void> _runBuild(
if (install)
...<String>['--target', 'INSTALL'],
if (globals.logger.isVerbose)
'--verbose'
'--verbose',
],
environment: <String, String>{
if (globals.logger.isVerbose)
'VERBOSE_SCRIPT_LOGGING': 'true'
'VERBOSE_SCRIPT_LOGGING': 'true',
},
trace: true,
stdoutErrorMatcher: errorMatcher,

View File

@@ -208,7 +208,7 @@ class VisualStudio {
/// See https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids
static const List<String> _requiredWorkloads = <String>[
'Microsoft.VisualStudio.Workload.NativeDesktop',
'Microsoft.VisualStudio.Workload.VCTools'
'Microsoft.VisualStudio.Workload.VCTools',
];
/// Components for use with vswhere requirements.
@@ -301,7 +301,7 @@ class VisualStudio {
'-requires',
requiredWorkload,
],
..._requiredComponents(_minimumSupportedVersion).keys
..._requiredComponents(_minimumSupportedVersion).keys,
]
: <String>[];
try {