prefer_const_declarations on local variables (#14358)

This commit is contained in:
Alexandre Ardhuin
2018-02-01 07:51:26 +01:00
committed by GitHub
parent b0e17949aa
commit 841d5d7bd5
129 changed files with 791 additions and 791 deletions

View File

@@ -34,7 +34,7 @@ void main() {
/// Copies between 2 instances of file systems which is also supported by copyDirectorySync().
test('test directory copy', () async {
final MemoryFileSystem sourceMemoryFs = new MemoryFileSystem();
final String sourcePath = '/some/origin';
const String sourcePath = '/some/origin';
final Directory sourceDirectory = await sourceMemoryFs.directory(sourcePath).create(recursive: true);
sourceMemoryFs.currentDirectory = sourcePath;
final File sourceFile1 = sourceMemoryFs.file('some_file.txt')..writeAsStringSync('bleh');
@@ -44,7 +44,7 @@ void main() {
// Copy to another memory file system instance.
final MemoryFileSystem targetMemoryFs = new MemoryFileSystem();
final String targetPath = '/some/non-existent/target';
const String targetPath = '/some/non-existent/target';
final Directory targetDirectory = targetMemoryFs.directory(targetPath);
copyDirectorySync(sourceDirectory, targetDirectory);