Declare locals as final where not reassigned (#8576)

Fix a few regressions.
This commit is contained in:
Chris Bracken
2017-03-03 18:40:19 -08:00
committed by GitHub
parent cdeb83cf59
commit 33ef949efc
2 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ class _PlatformServicesState extends State<PlatformServices> {
Future<Null> _getLocation() async {
String location;
try {
List<double> result = await platform.invokeMethod('getLocation', 'network');
final List<double> result = await platform.invokeMethod('getLocation', 'network');
location = 'Latitude ${result[0]}, Longitude ${result[1]}.';
} on PlatformException catch (e) {
location = "Failed to get location: '${e.message}'.";