some whitespace cleanup (#14443)
This commit is contained in:
committed by
GitHub
parent
688a571c71
commit
c02b6a8bcf
@@ -410,7 +410,7 @@ class AndroidDevice extends Device {
|
||||
cmd = adbCommandForDevice(<String>[
|
||||
'shell', 'am', 'start',
|
||||
'-a', 'android.intent.action.RUN',
|
||||
'-f', '0x20000000', // FLAG_ACTIVITY_SINGLE_TOP
|
||||
'-f', '0x20000000', // FLAG_ACTIVITY_SINGLE_TOP
|
||||
'--ez', 'enable-background-compilation', 'true',
|
||||
'--ez', 'enable-dart-profiling', 'true',
|
||||
]);
|
||||
|
||||
@@ -168,7 +168,7 @@ class AndroidSdk {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Try to find the NDK compiler. If we can't find it, it's also ok.
|
||||
// Try to find the NDK compiler. If we can't find it, it's also ok.
|
||||
final String ndkDir = findNdk(androidHomeDir);
|
||||
String ndkCompiler;
|
||||
List<String> ndkCompilerArgs;
|
||||
|
||||
@@ -114,7 +114,7 @@ class CachedArtifacts extends Artifacts {
|
||||
}
|
||||
|
||||
@override
|
||||
String getEngineType(TargetPlatform platform, [BuildMode mode]){
|
||||
String getEngineType(TargetPlatform platform, [BuildMode mode]) {
|
||||
return fs.path.basename(_getEngineArtifactsPath(platform, mode));
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class Flags {
|
||||
}
|
||||
|
||||
/// `true` iff the given flag/option was either explicitly specified by the
|
||||
/// user at the command-line or it was defined to have a default value.
|
||||
/// user at the command-line or it was defined to have a default value.
|
||||
bool contains(String key) {
|
||||
final ArgResults commandResults = _globalResults.command;
|
||||
final Iterable<String> options = commandResults?.options;
|
||||
|
||||
@@ -166,7 +166,7 @@ class _WindowsUtils extends OperatingSystemUtils {
|
||||
final List<String> lines = result.stdout.trim().split('\n');
|
||||
if (all)
|
||||
return lines.map((String path) => fs.file(path.trim())).toList();
|
||||
return <File>[fs.file(lines.first.trim())];
|
||||
return <File>[fs.file(lines.first.trim())];
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -115,7 +115,7 @@ String getElapsedAsMilliseconds(Duration duration) {
|
||||
/// absolute path.
|
||||
String getDisplayPath(String fullPath) {
|
||||
final String cwd = fs.currentDirectory.path + fs.path.separator;
|
||||
return fullPath.startsWith(cwd) ? fullPath.substring(cwd.length) : fullPath;
|
||||
return fullPath.startsWith(cwd) ? fullPath.substring(cwd.length) : fullPath;
|
||||
}
|
||||
|
||||
/// A class to maintain a list of items, fire events when items are added or
|
||||
@@ -207,7 +207,7 @@ class Uuid {
|
||||
'${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}-'
|
||||
'${_bitsDigits(16, 4)}-'
|
||||
'4${_bitsDigits(12, 3)}-'
|
||||
'${_printDigits(special, 1)}${_bitsDigits(12, 3)}-'
|
||||
'${_printDigits(special, 1)}${_bitsDigits(12, 3)}-'
|
||||
'${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}';
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class BuildInfo {
|
||||
|
||||
// Whether build should be done using Dart2 Frontend parser.
|
||||
final bool previewDart2;
|
||||
|
||||
|
||||
// Whether build should use strong mode semantics.
|
||||
final bool strongMode;
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ abstract class CachedArtifact {
|
||||
String get version => cache.getVersionFor(name);
|
||||
|
||||
/// Keep track of the files we've downloaded for this execution so we
|
||||
/// can delete them after completion. We don't delete them right after
|
||||
/// can delete them after completion. We don't delete them right after
|
||||
/// extraction in case [update] is interrupted, so we can restart without
|
||||
/// starting from scratch.
|
||||
final List<File> _downloadedFiles = <File>[];
|
||||
|
||||
@@ -306,8 +306,8 @@ Future<String> _buildAotSnapshot(
|
||||
}
|
||||
if (platform == TargetPlatform.android_arm) {
|
||||
genSnapshotCmd.addAll(<String>[
|
||||
'--no-sim-use-hardfp', // Android uses the softfloat ABI.
|
||||
'--no-use-integer-division', // Not supported by the Pixel in 32-bit mode.
|
||||
'--no-sim-use-hardfp', // Android uses the softfloat ABI.
|
||||
'--no-use-integer-division', // Not supported by the Pixel in 32-bit mode.
|
||||
]);
|
||||
}
|
||||
break;
|
||||
@@ -449,9 +449,9 @@ Future<String> _buildAotSnapshot(
|
||||
} else {
|
||||
if (compileToSharedLibrary) {
|
||||
// A word of warning: Instead of compiling via two steps, to a .o file and
|
||||
// then to a .so file we use only one command. When using two commands
|
||||
// then to a .so file we use only one command. When using two commands
|
||||
// gcc will end up putting a .eh_frame and a .debug_frame into the shared
|
||||
// library. Without stripping .debug_frame afterwards, unwinding tools
|
||||
// library. Without stripping .debug_frame afterwards, unwinding tools
|
||||
// based upon libunwind use just one and ignore the contents of the other
|
||||
// (which causes it to not look into the other section and therefore not
|
||||
// find the correct unwinding information).
|
||||
|
||||
@@ -15,8 +15,8 @@ class BuildApkCommand extends BuildSubCommand {
|
||||
usesPubOption();
|
||||
|
||||
argParser
|
||||
..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
|
||||
..addFlag('strong', negatable: false, hide: !verboseHelp)
|
||||
..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp)
|
||||
..addFlag('strong', negatable: false, hide: !verboseHelp)
|
||||
..addFlag('prefer-shared-library', negatable: false,
|
||||
help: 'Whether to prefer compiling to a *.so file (android only).')
|
||||
..addOption('target-platform',
|
||||
|
||||
@@ -39,7 +39,7 @@ class DevicesCommand extends FlutterCommand {
|
||||
printStatus('');
|
||||
for (String diagnostic in diagnostics) {
|
||||
printStatus('• ${diagnostic.replaceAll('\n', '\n ')}');
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printStatus('${devices.length} connected ${pluralize('device', devices.length)}:\n');
|
||||
|
||||
@@ -96,7 +96,7 @@ class IdeConfigCommand extends FlutterCommand {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Test byte by byte. We're assuming that these are small files.
|
||||
// Test byte by byte. We're assuming that these are small files.
|
||||
final List<int> srcBytes = src.readAsBytesSync();
|
||||
final List<int> destBytes = dest.readAsBytesSync();
|
||||
for (int i = 0; i < srcBytes.length; ++i) {
|
||||
|
||||
@@ -102,7 +102,7 @@ class PackagesTestCommand extends FlutterCommand {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Null> runCommand() => pub(<String>['run', 'test']..addAll(argResults.rest), context: PubContext.runTest, retry: false);
|
||||
Future<Null> runCommand() => pub(<String>['run', 'test']..addAll(argResults.rest), context: PubContext.runTest, retry: false);
|
||||
}
|
||||
|
||||
class PackagesPassthroughCommand extends FlutterCommand {
|
||||
|
||||
@@ -87,7 +87,7 @@ class CrashReportSender {
|
||||
req.fields['product'] = _kProductId;
|
||||
req.fields['version'] = flutterVersion;
|
||||
req.fields['osName'] = platform.operatingSystem;
|
||||
req.fields['osVersion'] = os.name; // this actually includes version
|
||||
req.fields['osVersion'] = os.name; // this actually includes version
|
||||
req.fields['type'] = _kDartTypeId;
|
||||
req.fields['error_runtime_type'] = '${error.runtimeType}';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ String get dartSdkPath {
|
||||
const List<String> dartVmFlags = const <String>[];
|
||||
|
||||
/// Return the platform specific name for the given Dart SDK binary. So, `pub`
|
||||
/// ==> `pub.bat`. The default SDK location can be overridden with a specified
|
||||
/// ==> `pub.bat`. The default SDK location can be overridden with a specified
|
||||
/// [sdkLocation].
|
||||
String sdkBinaryName(String name, { String sdkLocation }) {
|
||||
return fs.path.absolute(fs.path.join(sdkLocation ?? dartSdkPath, 'bin', platform.isWindows ? '$name.bat' : name));
|
||||
|
||||
@@ -12,7 +12,7 @@ import 'base/file_system.dart';
|
||||
import 'cache.dart';
|
||||
import 'globals.dart';
|
||||
|
||||
/// A wrapper around the `flutter` section in the `pubspec.yaml` file.
|
||||
/// A wrapper around the `flutter` section in the `pubspec.yaml` file.
|
||||
class FlutterManifest {
|
||||
FlutterManifest._();
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ class HotRunner extends ResidentRunner {
|
||||
} else {
|
||||
final bool reloadOnTopOfSnapshot = _runningFromSnapshot;
|
||||
final String progressPrefix = reloadOnTopOfSnapshot ? 'Initializing' : 'Performing';
|
||||
final Status status = logger.startProgress(
|
||||
final Status status = logger.startProgress(
|
||||
'$progressPrefix hot reload...',
|
||||
progressId: 'hot.reload'
|
||||
);
|
||||
|
||||
@@ -163,7 +163,7 @@ abstract class FlutterCommand extends Command<Null> {
|
||||
final bool previewDart2 = argParser.options.containsKey('preview-dart-2')
|
||||
? argResults['preview-dart-2']
|
||||
: false;
|
||||
final bool strongMode = argParser.options.containsKey('strong')
|
||||
final bool strongMode = argParser.options.containsKey('strong')
|
||||
? argResults['strong']
|
||||
: false;
|
||||
if (strongMode == true && previewDart2 == false) {
|
||||
@@ -404,7 +404,7 @@ abstract class FlutterCommand extends Command<Null> {
|
||||
final bool previewDart2 = argParser.options.containsKey('preview-dart-2')
|
||||
? argResults['preview-dart-2']
|
||||
: false;
|
||||
final bool strongMode = argParser.options.containsKey('strong')
|
||||
final bool strongMode = argParser.options.containsKey('strong')
|
||||
? argResults['strong']
|
||||
: false;
|
||||
if (strongMode == true && previewDart2 == false) {
|
||||
|
||||
@@ -162,7 +162,7 @@ class FlutterVersion {
|
||||
static Future<Null> _removeVersionCheckRemoteIfExists() async {
|
||||
final List<String> remotes = (await _run(<String>['git', 'remote']))
|
||||
.split('\n')
|
||||
.map((String name) => name.trim()) // to account for OS-specific line-breaks
|
||||
.map((String name) => name.trim()) // to account for OS-specific line-breaks
|
||||
.toList();
|
||||
if (remotes.contains(_kVersionCheckRemote))
|
||||
await _run(<String>['git', 'remote', 'remove', _kVersionCheckRemote]);
|
||||
|
||||
@@ -547,7 +547,7 @@ abstract class ServiceObjectOwner extends ServiceObject {
|
||||
VMService get vmService => null;
|
||||
|
||||
/// Builds a [ServiceObject] corresponding to the [id] from [map].
|
||||
/// The result may come from the cache. The result will not necessarily
|
||||
/// The result may come from the cache. The result will not necessarily
|
||||
/// be [loaded].
|
||||
ServiceObject getFromMap(Map<String, dynamic> map);
|
||||
}
|
||||
@@ -1171,7 +1171,7 @@ class Isolate extends ServiceObjectOwner {
|
||||
|
||||
Future<Map<String, dynamic>> flutterTogglePerformanceOverlayOverride() => _flutterToggle('showPerformanceOverlay');
|
||||
|
||||
Future<Map<String, dynamic>> flutterToggleWidgetInspector() => _flutterToggle('debugWidgetInspector');
|
||||
Future<Map<String, dynamic>> flutterToggleWidgetInspector() => _flutterToggle('debugWidgetInspector');
|
||||
|
||||
Future<Null> flutterDebugAllowBanner(bool show) async {
|
||||
await invokeFlutterExtensionRpcRaw(
|
||||
|
||||
Reference in New Issue
Block a user