This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +68
-5
lines changed
packages/connectivity/connectivity Expand file tree Collapse file tree 8 files changed +68
-5
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.4.9
2
+
3
+ * Add support for ` web ` (by endorsing ` connectivity_for_web ` 0.3.0)
4
+
1
5
## 0.4.8+6
2
6
3
7
* Update lower bound of dart dependency to 2.1.0.
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class _MyHomePageState extends State<MyHomePage> {
91
91
Widget build (BuildContext context) {
92
92
return Scaffold (
93
93
appBar: AppBar (
94
- title: const Text ('Plugin example app' ),
94
+ title: const Text ('Connectivity example app' ),
95
95
),
96
96
body: Center (child: Text ('Connection Status: $_connectionStatus ' )),
97
97
);
@@ -103,7 +103,7 @@ class _MyHomePageState extends State<MyHomePage> {
103
103
String wifiName, wifiBSSID, wifiIP;
104
104
105
105
try {
106
- if (Platform .isIOS) {
106
+ if (! kIsWeb && Platform .isIOS) {
107
107
LocationAuthorizationStatus status =
108
108
await _connectivity.getLocationServiceAuthorization ();
109
109
if (status == LocationAuthorizationStatus .notDetermined) {
@@ -125,7 +125,7 @@ class _MyHomePageState extends State<MyHomePage> {
125
125
}
126
126
127
127
try {
128
- if (Platform .isIOS) {
128
+ if (! kIsWeb && Platform .isIOS) {
129
129
LocationAuthorizationStatus status =
130
130
await _connectivity.getLocationServiceAuthorization ();
131
131
if (status == LocationAuthorizationStatus .notDetermined) {
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta content ="IE=Edge " http-equiv ="X-UA-Compatible ">
6
+ < meta name ="description " content ="A new Flutter project. ">
7
+
8
+ <!-- iOS meta tags & icons -->
9
+ < meta name ="apple-mobile-web-app-capable " content ="yes ">
10
+ < meta name ="apple-mobile-web-app-status-bar-style " content ="black ">
11
+ < meta name ="apple-mobile-web-app-title " content ="example ">
12
+ < link rel ="apple-touch-icon " href ="icons/Icon-192.png ">
13
+
14
+ <!-- Favicon -->
15
+ < link rel ="shortcut icon " type ="image/png " href ="favicon.png "/>
16
+
17
+ < title > example</ title >
18
+ < link rel ="manifest " href ="manifest.json ">
19
+ </ head >
20
+ < body >
21
+ <!-- This script installs service_worker.js to provide PWA functionality to
22
+ application. For more information, see:
23
+ https://developers.google.com/web/fundamentals/primers/service-workers -->
24
+ < script >
25
+ if ( 'serviceWorker' in navigator ) {
26
+ window . addEventListener ( 'load' , function ( ) {
27
+ navigator . serviceWorker . register ( 'flutter_service_worker.js' ) ;
28
+ } ) ;
29
+ }
30
+ </ script >
31
+ < script src ="main.dart.js " type ="application/javascript "> </ script >
32
+ </ body >
33
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " example" ,
3
+ "short_name" : " example" ,
4
+ "start_url" : " ." ,
5
+ "display" : " standalone" ,
6
+ "background_color" : " #0175C2" ,
7
+ "theme_color" : " #0175C2" ,
8
+ "description" : " A new Flutter project." ,
9
+ "orientation" : " portrait-primary" ,
10
+ "prefer_related_applications" : false ,
11
+ "icons" : [
12
+ {
13
+ "src" : " icons/Icon-192.png" ,
14
+ "sizes" : " 192x192" ,
15
+ "type" : " image/png"
16
+ },
17
+ {
18
+ "src" : " icons/Icon-512.png" ,
19
+ "sizes" : " 512x512" ,
20
+ "type" : " image/png"
21
+ }
22
+ ]
23
+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/c
5
5
# 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump
6
6
# the version to 2.0.0.
7
7
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
8
- version : 0.4.8+6
8
+ version : 0.4.9
9
9
10
10
flutter :
11
11
plugin :
@@ -17,13 +17,16 @@ flutter:
17
17
pluginClass : FLTConnectivityPlugin
18
18
macos :
19
19
default_package : connectivity_macos
20
+ web :
21
+ default_package : connectivity_for_web
20
22
21
23
dependencies :
22
24
flutter :
23
25
sdk : flutter
24
- meta : " ^1.0.5"
26
+ meta : ^1.0.5
25
27
connectivity_platform_interface : ^1.0.2
26
28
connectivity_macos : ^0.1.0
29
+ connectivity_for_web : ^0.3.0
27
30
28
31
dev_dependencies :
29
32
flutter_test :
You can’t perform that action at this time.
0 commit comments