Skip to content

Commit dca2f42

Browse files
author
Michael Klimushyn
authored
[connectivity] Fix unawaited futures (flutter#2313)
1 parent 40b4ab0 commit dca2f42

File tree

5 files changed

+8
-14
lines changed

5 files changed

+8
-14
lines changed

packages/connectivity/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.5+7
2+
3+
* Fix unawaited futures in the example app and tests.
4+
15
## 0.4.5+6
26

37
* Fix singleton Reachability problem on iOS.

packages/connectivity/analysis_options.yaml

-10
This file was deleted.

packages/connectivity/example/lib/main.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class _MyHomePageState extends State<MyHomePage> {
7171
// message was in flight, we want to discard the reply rather than calling
7272
// setState to update our non-existent appearance.
7373
if (!mounted) {
74-
return;
74+
return Future.value(null);
7575
}
7676

77-
_updateConnectionStatus(result);
77+
return _updateConnectionStatus(result);
7878
}
7979

8080
@override

packages/connectivity/example/test_driver/test/connectivity_e2e_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ Future<void> main() async {
99
final FlutterDriver driver = await FlutterDriver.connect();
1010
final String result =
1111
await driver.requestData(null, timeout: const Duration(minutes: 1));
12-
driver.close();
12+
await driver.close();
1313
exit(result == 'pass' ? 0 : 1);
1414
}

packages/connectivity/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi &
33
mobile/cellular) connectivity on Android and iOS.
44
author: Flutter Team <[email protected]>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity
6-
version: 0.4.5+6
6+
version: 0.4.5+7
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)