Skip to content

Commit 83e5a8a

Browse files
authored
some formatting changes (flutter#41640)
1 parent 85a3da3 commit 83e5a8a

File tree

9 files changed

+48
-61
lines changed

9 files changed

+48
-61
lines changed

packages/flutter/test/material/theme_data_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void main() {
176176
primaryColor: Colors.black,
177177
primaryColorDark: Colors.black,
178178
primaryColorLight: Colors.black,
179-
valueIndicatorTextStyle: const TextStyle(color: Colors.black)
179+
valueIndicatorTextStyle: const TextStyle(color: Colors.black),
180180
);
181181

182182
final ChipThemeData chipTheme = ChipThemeData.fromDefaults(
@@ -260,7 +260,7 @@ void main() {
260260
primaryColor: Colors.white,
261261
primaryColorDark: Colors.white,
262262
primaryColorLight: Colors.white,
263-
valueIndicatorTextStyle: const TextStyle(color: Colors.white)
263+
valueIndicatorTextStyle: const TextStyle(color: Colors.white),
264264
);
265265

266266
final ChipThemeData otherChipTheme = ChipThemeData.fromDefaults(

packages/flutter_tools/lib/src/android/android_device.dart

+15-17
Original file line numberDiff line numberDiff line change
@@ -574,24 +574,22 @@ class AndroidDevice extends Device {
574574
...<String>['--ez', 'trace-systrace', 'true'],
575575
if (debuggingOptions.dumpSkpOnShaderCompilation)
576576
...<String>['--ez', 'dump-skp-on-shader-compilation', 'true'],
577-
if (debuggingOptions.debuggingEnabled)
578-
...<String>[
579-
if (debuggingOptions.buildInfo.isDebug)
580-
...<String>[
581-
...<String>['--ez', 'enable-checked-mode', 'true'],
582-
...<String>['--ez', 'verify-entry-points', 'true'],
583-
],
584-
if (debuggingOptions.startPaused)
585-
...<String>['--ez', 'start-paused', 'true'],
586-
if (debuggingOptions.disableServiceAuthCodes)
587-
...<String>['--ez', 'disable-service-auth-codes', 'true'],
588-
if (debuggingOptions.dartFlags.isNotEmpty)
589-
...<String>['--es', 'dart-flags', debuggingOptions.dartFlags],
590-
if (debuggingOptions.useTestFonts)
591-
...<String>['--ez', 'use-test-fonts', 'true'],
592-
if (debuggingOptions.verboseSystemLogs)
593-
...<String>['--ez', 'verbose-logging', 'true'],
577+
if (debuggingOptions.debuggingEnabled) ...<String>[
578+
if (debuggingOptions.buildInfo.isDebug) ...<String>[
579+
...<String>['--ez', 'enable-checked-mode', 'true'],
580+
...<String>['--ez', 'verify-entry-points', 'true'],
594581
],
582+
if (debuggingOptions.startPaused)
583+
...<String>['--ez', 'start-paused', 'true'],
584+
if (debuggingOptions.disableServiceAuthCodes)
585+
...<String>['--ez', 'disable-service-auth-codes', 'true'],
586+
if (debuggingOptions.dartFlags.isNotEmpty)
587+
...<String>['--es', 'dart-flags', debuggingOptions.dartFlags],
588+
if (debuggingOptions.useTestFonts)
589+
...<String>['--ez', 'use-test-fonts', 'true'],
590+
if (debuggingOptions.verboseSystemLogs)
591+
...<String>['--ez', 'verbose-logging', 'true'],
592+
],
595593
apk.launchActivity,
596594
];
597595
final String result = (await runAdbCheckedAsync(cmd)).stdout;

packages/flutter_tools/lib/src/build_runner/web_compilation_delegate.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ class MultirootFileBasedAssetReader extends core.FileBasedAssetReader {
125125
@override
126126
Stream<AssetId> findAssets(Glob glob, {String package}) async* {
127127
if (package == null || packageGraph.root.name == package) {
128-
final String generatedRoot = fs.path.join(
129-
generatedDirectory.path, packageGraph.root.name
130-
);
128+
final String generatedRoot = fs.path.join(generatedDirectory.path, packageGraph.root.name);
131129
await for (io.FileSystemEntity entity in glob.list(followLinks: true, root: packageGraph.root.path)) {
132130
if (entity is io.File && _isNotHidden(entity) && !fs.path.isWithin(generatedRoot, entity.path)) {
133131
yield _fileToAssetId(entity, packageGraph.root);

packages/flutter_tools/lib/src/build_system/build_system.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ abstract class Target {
204204
return <String, Object>{
205205
'name': name,
206206
'dependencies': <String>[
207-
for (Target target in dependencies) target.name
207+
for (Target target in dependencies) target.name,
208208
],
209209
'inputs': <String>[
210210
for (File file in resolveInputs(environment).sources) file.path,

packages/flutter_tools/lib/src/build_system/source.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,4 +313,4 @@ class _DepfileSource implements Source {
313313

314314
@override
315315
bool get implicit => false;
316-
}
316+
}

packages/flutter_tools/lib/src/cache.dart

+14-23
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,11 @@ class FlutterSdk extends EngineCachedArtifact {
732732
return <List<String>>[
733733
<String>['common', 'flutter_patched_sdk.zip'],
734734
<String>['common', 'flutter_patched_sdk_product.zip'],
735-
if (cache.includeAllPlatforms)
736-
...<List<String>>[
737-
<String>['windows-x64', 'windows-x64/artifacts.zip'],
738-
<String>['linux-x64', 'linux-x64/artifacts.zip'],
739-
<String>['darwin-x64', 'darwin-x64/artifacts.zip'],
740-
]
735+
if (cache.includeAllPlatforms) ...<List<String>>[
736+
<String>['windows-x64', 'windows-x64/artifacts.zip'],
737+
<String>['linux-x64', 'linux-x64/artifacts.zip'],
738+
<String>['darwin-x64', 'darwin-x64/artifacts.zip'],
739+
]
741740
else if (platform.isWindows)
742741
<String>['windows-x64', 'windows-x64/artifacts.zip']
743742
else if (platform.isMacOS)
@@ -831,25 +830,17 @@ class AndroidGenSnapshotArtifacts extends EngineCachedArtifact {
831830
@override
832831
List<List<String>> getBinaryDirs() {
833832
return <List<String>>[
834-
if (cache.includeAllPlatforms)
835-
...<List<String>>[
836-
..._osxBinaryDirs,
837-
..._linuxBinaryDirs,
838-
..._windowsBinaryDirs,
839-
..._dartSdks,
840-
]
841-
else if (platform.isWindows)
842-
...<List<String>>[
843-
..._windowsBinaryDirs,
844-
]
833+
if (cache.includeAllPlatforms) ...<List<String>>[
834+
..._osxBinaryDirs,
835+
..._linuxBinaryDirs,
836+
..._windowsBinaryDirs,
837+
..._dartSdks,
838+
] else if (platform.isWindows)
839+
..._windowsBinaryDirs
845840
else if (platform.isMacOS)
846-
...<List<String>>[
847-
..._osxBinaryDirs,
848-
]
841+
..._osxBinaryDirs
849842
else if (platform.isLinux)
850-
...<List<String>>[
851-
..._linuxBinaryDirs,
852-
],
843+
..._linuxBinaryDirs,
853844
];
854845
}
855846

packages/flutter_tools/lib/src/linux/build_linux.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export PROJECT_DIR=${linuxProject.project.directory.path}
5252
'make',
5353
'-C',
5454
linuxProject.makeFile.parent.path,
55-
'BUILD=$buildFlag'
55+
'BUILD=$buildFlag',
5656
]);
5757
final Status status = logger.startProgress(
5858
'Building Linux application...',

packages/flutter_tools/test/general.shard/build_runner/multiroot_asset_reader_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void main() {
4040
await IOOverrides.runWithIOOverrides(() async {
4141
final MultirootFileBasedAssetReader reader = MultirootFileBasedAssetReader(
4242
packageGraph,
43-
fs.directory(fs.path.join('.dart_tool', 'build', 'generated'))
43+
fs.directory(fs.path.join('.dart_tool', 'build', 'generated')),
4444
);
4545
expect(await reader.canRead(AssetId('foobar', 'lib/bar.dart')), true);
4646
expect(await reader.canRead(AssetId('foobar', 'lib/main.dart')), true);

packages/flutter_tools/test/general.shard/project_test.dart

+12-12
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,19 @@ void main() {
195195
await project.ensureReadyForPlatformSpecificTooling();
196196
expectExists(project.macos.managedDirectory.childFile('GeneratedPluginRegistrant.swift'));
197197
}, overrides: <Type, Generator>{
198-
FileSystem: () => MemoryFileSystem(),
199-
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
200-
FlutterProjectFactory: () => FlutterProjectFactory(),
198+
FileSystem: () => MemoryFileSystem(),
199+
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
200+
FlutterProjectFactory: () => FlutterProjectFactory(),
201201
});
202202
testUsingContext('generates Xcode configuration for macOS', () async {
203203
final FlutterProject project = await someProject();
204204
project.macos.managedDirectory.createSync(recursive: true);
205205
await project.ensureReadyForPlatformSpecificTooling();
206206
expectExists(project.macos.generatedXcodePropertiesFile);
207207
}, overrides: <Type, Generator>{
208-
FileSystem: () => MemoryFileSystem(),
209-
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
210-
FlutterProjectFactory: () => FlutterProjectFactory(),
208+
FileSystem: () => MemoryFileSystem(),
209+
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
210+
FlutterProjectFactory: () => FlutterProjectFactory(),
211211
});
212212
testUsingContext('injects plugins for Linux', () async {
213213
final FlutterProject project = await someProject();
@@ -216,9 +216,9 @@ void main() {
216216
expectExists(project.linux.managedDirectory.childFile('generated_plugin_registrant.h'));
217217
expectExists(project.linux.managedDirectory.childFile('generated_plugin_registrant.cc'));
218218
}, overrides: <Type, Generator>{
219-
FileSystem: () => MemoryFileSystem(),
220-
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: true),
221-
FlutterProjectFactory: () => FlutterProjectFactory(),
219+
FileSystem: () => MemoryFileSystem(),
220+
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: true),
221+
FlutterProjectFactory: () => FlutterProjectFactory(),
222222
});
223223
testUsingContext('injects plugins for Windows', () async {
224224
final FlutterProject project = await someProject();
@@ -227,9 +227,9 @@ void main() {
227227
expectExists(project.windows.managedDirectory.childFile('generated_plugin_registrant.h'));
228228
expectExists(project.windows.managedDirectory.childFile('generated_plugin_registrant.cc'));
229229
}, overrides: <Type, Generator>{
230-
FileSystem: () => MemoryFileSystem(),
231-
FeatureFlags: () => TestFeatureFlags(isWindowsEnabled: true),
232-
FlutterProjectFactory: () => FlutterProjectFactory(),
230+
FileSystem: () => MemoryFileSystem(),
231+
FeatureFlags: () => TestFeatureFlags(isWindowsEnabled: true),
232+
FlutterProjectFactory: () => FlutterProjectFactory(),
233233
});
234234
testInMemory('creates Android library in module', () async {
235235
final FlutterProject project = await aModuleProject();

0 commit comments

Comments
 (0)