From 98f878d66d1f14b5a5a82049059affcba82dcbbc Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 8 Nov 2019 12:56:27 -0800 Subject: [PATCH 1/3] add more documentations, delete example/README --- packages/connectivity/CHANGELOG.md | 4 ++++ packages/connectivity/example/README.md | 8 -------- packages/connectivity/lib/connectivity.dart | 1 + packages/connectivity/pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 packages/connectivity/example/README.md diff --git a/packages/connectivity/CHANGELOG.md b/packages/connectivity/CHANGELOG.md index 5a7b5f7f4e05..3ede2383d207 100644 --- a/packages/connectivity/CHANGELOG.md +++ b/packages/connectivity/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.5+4 + +* Stability and Maintainability: update documentations. + ## 0.4.5+3 * Remove AndroidX warnings. diff --git a/packages/connectivity/example/README.md b/packages/connectivity/example/README.md deleted file mode 100644 index a7bac8c32e46..000000000000 --- a/packages/connectivity/example/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# connectivity_example - -Demonstrates how to use the connectivity plugin. - -## Getting Started - -For help getting started with Flutter, view our online -[documentation](http://flutter.io/). \ No newline at end of file diff --git a/packages/connectivity/lib/connectivity.dart b/packages/connectivity/lib/connectivity.dart index 03659f5455a9..7dddebe691d8 100644 --- a/packages/connectivity/lib/connectivity.dart +++ b/packages/connectivity/lib/connectivity.dart @@ -15,6 +15,7 @@ import 'package:meta/meta.dart'; /// None: Device not connected to any network enum ConnectivityResult { wifi, mobile, none } +/// Discovers network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more. class Connectivity { /// Constructs a singleton instance of [Connectivity]. /// diff --git a/packages/connectivity/pubspec.yaml b/packages/connectivity/pubspec.yaml index 4466c7ef6054..ede6c241c836 100644 --- a/packages/connectivity/pubspec.yaml +++ b/packages/connectivity/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS. author: Flutter Team homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity -version: 0.4.5+3 +version: 0.4.5+4 flutter: plugin: From b8438aa4b6f8beec3016e1ab14f6caea1b2119ab Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 8 Nov 2019 12:58:16 -0800 Subject: [PATCH 2/3] Update connectivity.dart --- packages/connectivity/lib/connectivity.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connectivity/lib/connectivity.dart b/packages/connectivity/lib/connectivity.dart index 7dddebe691d8..8a675b9497cf 100644 --- a/packages/connectivity/lib/connectivity.dart +++ b/packages/connectivity/lib/connectivity.dart @@ -15,7 +15,7 @@ import 'package:meta/meta.dart'; /// None: Device not connected to any network enum ConnectivityResult { wifi, mobile, none } -/// Discovers network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more. +/// Discover network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more. class Connectivity { /// Constructs a singleton instance of [Connectivity]. /// From b810cd2d59427eea405f81f7ff01b088273f872b Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 8 Nov 2019 16:14:38 -0800 Subject: [PATCH 3/3] add dart docs for visibleForTesting methods --- packages/connectivity/lib/connectivity.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/connectivity/lib/connectivity.dart b/packages/connectivity/lib/connectivity.dart index 7dddebe691d8..4270c07b8190 100644 --- a/packages/connectivity/lib/connectivity.dart +++ b/packages/connectivity/lib/connectivity.dart @@ -36,11 +36,13 @@ class Connectivity { Stream _onConnectivityChanged; + /// Exposed for testing purposes and should not be used by users of the plugin. @visibleForTesting static const MethodChannel methodChannel = MethodChannel( 'plugins.flutter.io/connectivity', ); + /// Exposed for testing purposes and should not be used by users of the plugin. @visibleForTesting static const EventChannel eventChannel = EventChannel( 'plugins.flutter.io/connectivity_status',