Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed Apr 11, 2024
1 parent 68afaba commit 9c9d95f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/connectivity_plus/connectivity_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ if (connectivityResult.contains(ConnectivityResult.mobile)) {
```

You can also listen for active connectivity types changes by subscribing to the stream
exposed by the plugin:
exposed by the plugin.

This method should ensure emitting only distinct values.

```dart
import 'package:connectivity_plus/connectivity_plus.dart';
Expand Down Expand Up @@ -99,6 +101,8 @@ _`none` is supported on all platforms by default._

Connectivity changes are no longer communicated to Android apps in the background starting with Android O (8.0). You should always check for connectivity status when your app is resumed. The broadcast is only useful when your application is in the foreground.

To ensure connectivity changes on Android are tracked correctly, an event containing `[ConnectivityResult.none]` may be emitted in during connectivity changes. e.g. Going from WiFi to mobile network may emit: `[wifi] -> [none] -> [mobile]`.

### iOS & MacOS

On iOS simulators, the connectivity types stream might not update when Wi-Fi status changes. This is a known issue.
Expand Down

0 comments on commit 9c9d95f

Please sign in to comment.