diff --git a/examples/platform_services/lib/main.dart b/examples/platform_services/lib/main.dart index 300604a81b0..22a397ab907 100644 --- a/examples/platform_services/lib/main.dart +++ b/examples/platform_services/lib/main.dart @@ -19,7 +19,7 @@ class _PlatformServicesState extends State { Future _getLocation() async { String location; try { - List result = await platform.invokeMethod('getLocation', 'network'); + final List result = await platform.invokeMethod('getLocation', 'network'); location = 'Latitude ${result[0]}, Longitude ${result[1]}.'; } on PlatformException catch (e) { location = "Failed to get location: '${e.message}'."; diff --git a/packages/flutter_tools/test/devfs_test.dart b/packages/flutter_tools/test/devfs_test.dart index 1549025aa8f..5fe961e24e9 100644 --- a/packages/flutter_tools/test/devfs_test.dart +++ b/packages/flutter_tools/test/devfs_test.dart @@ -145,11 +145,11 @@ void main() { expect(bytes, 69); }); testUsingContext('add new package with double slashes in URI', () async { - String packageName = 'doubleslashpkg'; + final String packageName = 'doubleslashpkg'; await _createPackage(packageName, 'somefile.txt', doubleSlash: true); - Set fileFilter = new Set(); - List pkgUris = [fs.path.toUri(basePath)]..addAll(_packages.values); + final Set fileFilter = new Set(); + final List pkgUris = [fs.path.toUri(basePath)]..addAll(_packages.values); for (Uri pkgUri in pkgUris) { if (!pkgUri.isAbsolute) { pkgUri = fs.path.toUri(fs.path.join(basePath, pkgUri.path)); @@ -161,7 +161,7 @@ void main() { .toList()); } - int bytes = await devFS.update(fileFilter: fileFilter); + final int bytes = await devFS.update(fileFilter: fileFilter); devFSOperations.expectMessages([ 'writeFile test .packages', 'writeFile test packages/doubleslashpkg/somefile.txt', @@ -364,7 +364,7 @@ Future _createPackage(String pkgName, String pkgFileName, { bool doubleSla String pkgFilePath = fs.path.join(pkgTempDir.path, pkgName, 'lib', pkgFileName); if (doubleSlash) { // Force two separators into the path. - String doubleSlash = fs.path.separator + fs.path.separator; + final String doubleSlash = fs.path.separator + fs.path.separator; pkgFilePath = pkgTempDir.path + doubleSlash + fs.path.join(pkgName, 'lib', pkgFileName); } final File pkgFile = fs.file(pkgFilePath);