You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: packages/connectivity/README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ This plugin works for iOS and Android.
7
7
> Note that on Android, this does not guarantee connection to Internet. For instance,
8
8
the app might have wifi access but it might be a VPN or a hotel WiFi with no access.
9
9
10
+
## Usage
11
+
10
12
Sample usage to check current status:
11
13
12
14
```dart
@@ -48,6 +50,28 @@ dispose() {
48
50
}
49
51
```
50
52
53
+
You can get WIFI related information using:
54
+
55
+
```dart
56
+
import 'package:connectivity/connectivity.dart';
57
+
58
+
var wifiBSSID = await (Connectivity().getWifiBSSID());
59
+
var wifiIP = await (Connectivity().getWifiIP());network
60
+
var wifiName = await (Connectivity().getWifiName());wifi network
61
+
```
62
+
63
+
### Known Issues
64
+
65
+
#### iOS 13
66
+
67
+
The methods `.getWifiBSSID()` and `.getWifiName()` utilize the [CNCopyCurrentNetworkInfo](https://developer.apple.com/documentation/systemconfiguration/1614126-cncopycurrentnetworkinfo) function on iOS.
68
+
69
+
As of iOS 13, Apple announced that these APIs will no longer return valid information by default and will instead return the following:
70
+
> SSID: "Wi-Fi" or "WLAN" ("WLAN" will be returned for the China SKU)
71
+
> BSSID: "00:00:00:00:00:00"
72
+
73
+
You can follow issue [#37804](https://github.com/flutter/flutter/issues/37804) for the changes required to return valid SSID and BSSID values with iOS 13.
74
+
51
75
## Getting Started
52
76
53
77
For help getting started with Flutter, view our online
0 commit comments