Danny Tuppeny
2016-08-09 18:27:53 UTC
The formatter does this to my code:
List<String> read(String filename) {
var file = new File(filename);
if (!file.existsSync()) {
return new List<String>();
}
return file
.readAsLinesSync() // Why are these lines 6 spaces in, not 4?
.map((l) => l.trim())
.where((l) => l != null && !l.isEmpty)
.toList();
}
I don't really understand why the code in the lines after "return" is being
intended 4 spaces more than the return. Any ideas?
List<String> read(String filename) {
var file = new File(filename);
if (!file.existsSync()) {
return new List<String>();
}
return file
.readAsLinesSync() // Why are these lines 6 spaces in, not 4?
.map((l) => l.trim())
.where((l) => l != null && !l.isEmpty)
.toList();
}
I don't really understand why the code in the lines after "return" is being
intended 4 spaces more than the return. Any ideas?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.