Add space before curly parentheses. (#85306)

This commit is contained in:
Ahmed Ashour
2021-07-01 22:51:05 +02:00
committed by GitHub
parent 76db0d7428
commit a3dc90c4f5
45 changed files with 75 additions and 75 deletions

View File

@@ -1106,7 +1106,7 @@ class ArtifactUpdater {
}
@visibleForTesting
String flattenNameSubdirs(Uri url, FileSystem fileSystem){
String flattenNameSubdirs(Uri url, FileSystem fileSystem) {
final List<String> pieces = <String>[url.host, ...url.pathSegments];
final Iterable<String> convertedPieces = pieces.map<String>(_flattenNameNoSubdirs);
return fileSystem.path.joinAll(convertedPieces);

View File

@@ -96,7 +96,7 @@ class ChannelCommand extends FlutterCommand {
// only print non-missing channels
if (availableChannels[i]) {
String currentIndicator = ' ';
if (officialChannels[i] == currentChannel){
if (officialChannels[i] == currentChannel) {
currentIndicator = '*';
}
globals.printStatus('$currentIndicator ${officialChannels[i]}');

View File

@@ -308,7 +308,7 @@ class CreateCommand extends CreateBase {
_printPluginDirectoryLocationMessage(relativePluginPath, projectName, platformsString);
if (!creatingNewProject && requestedPlatforms.isNotEmpty) {
_printPluginUpdatePubspecMessage(relativePluginPath, platformsString);
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty){
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty) {
_printNoPluginMessage();
}

View File

@@ -266,7 +266,7 @@ abstract class DeviceManager {
.where((Device device) => device.ephemeral == true)
.toList();
if (ephemeralDevices.length == 1){
if (ephemeralDevices.length == 1) {
devices = ephemeralDevices;
}
}

View File

@@ -279,7 +279,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
}
/// Converts [browserName] string to [Browser]
Browser _browserNameToEnum(String browserName){
Browser _browserNameToEnum(String browserName) {
switch (browserName) {
case 'android-chrome': return Browser.androidChrome;
case 'chrome': return Browser.chrome;

View File

@@ -834,7 +834,7 @@ dependencies:
const String newPluginName = 'flutterEngine.getPlugins().add(new plugin1.UseNewEmbedding());';
const String oldPluginName = 'abcplugin1.UseOldEmbedding.registerWith(shimPluginRegistry.registrarFor("abcplugin1.UseOldEmbedding"));';
final String content = registrant.readAsStringSync();
for(final String plugin in <String>[newPluginName,oldPluginName]){
for(final String plugin in <String>[newPluginName,oldPluginName]) {
expect(content, contains(plugin));
expect(content.split(plugin).first.trim().endsWith('try {'), isTrue);
expect(content.split(plugin).last.trim().startsWith('} catch(Exception e) {'), isTrue);

View File

@@ -277,7 +277,7 @@ void main() {
expectExists(pluginRegistrantClasses.childFile('GeneratedPluginRegistrant.m'));
});
testUsingContext('Version.json info is correct', (){
testUsingContext('Version.json info is correct', () {
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
final FlutterManifest manifest = FlutterManifest.createFromString('''
name: test