prefer_is_empty and prefer_is_not_empty (#8474)
This commit is contained in:
committed by
Adam Barth
parent
2f002885cc
commit
69b6bb87d1
@@ -247,7 +247,7 @@ class _DevFSHttpWriter {
|
||||
|
||||
void _scheduleWrites(DevFSProgressReporter progressReporter) {
|
||||
while (_inFlight < kMaxInFlight) {
|
||||
if (_outstanding.length == 0) {
|
||||
if (_outstanding.isEmpty) {
|
||||
// Finished.
|
||||
break;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ class _DevFSHttpWriter {
|
||||
progressReporter(_done, _max);
|
||||
}
|
||||
_inFlight--;
|
||||
if ((_outstanding.length == 0) && (_inFlight == 0)) {
|
||||
if ((_outstanding.isEmpty) && (_inFlight == 0)) {
|
||||
_completer.complete(null);
|
||||
} else {
|
||||
_scheduleWrites(progressReporter);
|
||||
@@ -411,7 +411,7 @@ class DevFS {
|
||||
assetPathsToEvict.add(archivePath);
|
||||
}
|
||||
});
|
||||
if (dirtyEntries.length > 0) {
|
||||
if (dirtyEntries.isNotEmpty) {
|
||||
printTrace('Updating files');
|
||||
if (_httpWriter != null) {
|
||||
try {
|
||||
|
||||
@@ -251,7 +251,7 @@ class IOSDevice extends Device {
|
||||
'--justlaunch',
|
||||
];
|
||||
|
||||
if (launchArguments.length > 0) {
|
||||
if (launchArguments.isNotEmpty) {
|
||||
launchCommand.add('--args');
|
||||
launchCommand.add('${launchArguments.join(" ")}');
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ Directory _newTempDir() {
|
||||
}
|
||||
|
||||
void _cleanupTempDirs() {
|
||||
while (_tempDirs.length > 0) {
|
||||
while (_tempDirs.isNotEmpty) {
|
||||
_tempDirs.removeLast().deleteSync(recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user