Skip to content

Commit 3ebf57a

Browse files
authored
v0.2.4+1 (#14)
Fixes #13
1 parent 0dcbc4f commit 3ebf57a

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ dependencies:
1111
flutter_offline: "^0.2.4"
1212
```
1313
14+
#### Note for AndroidX Apps
15+
16+
Make sure to point to `0.2.4+1`
17+
1418
### ⚡️ Import
1519

1620
```dart

lib/src/main.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ class OfflineBuilderState extends State<OfflineBuilder> {
101101
) {
102102
final child = widget.child ?? widget.builder(context);
103103
if (!snapshot.hasData && !snapshot.hasError) {
104-
return SizedBox();
104+
return const SizedBox();
105105
} else if (snapshot.hasError) {
106106
if (widget.errorBuilder != null) {
107107
return widget.errorBuilder(context);
108108
}
109-
throw new OfflineBuilderError(snapshot.error);
109+
throw OfflineBuilderError(snapshot.error);
110110
}
111111
return widget.connectivityBuilder(context, snapshot.data, child);
112112
},

pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ packages:
3535
name: connectivity
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "0.3.1"
38+
version: "0.4.2"
3939
flutter:
4040
dependency: "direct main"
4141
description: flutter

pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: flutter_offline
22
description: A tidy utility to handle offline/online connectivity like a Boss.
3-
version: 0.2.4
3+
version: 0.2.4+1
44
author: Jeremiah Ogbomo <[email protected]>
55
homepage: https://github.com/jogboms/flutter_offline
66

77
environment:
8-
sdk: ">=2.0.0-dev.68.0 <3.0.0"
8+
sdk: ">=2.1.0 <3.0.0"
99

1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
connectivity: ^0.3.1
13+
connectivity: ^0.4.2
1414

1515
dev_dependencies:
1616
flutter_test:

test/flutter_offline_test.dart

+7-3
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ class TestConnectivityService implements Connectivity {
287287
controller.add(result);
288288
}
289289

290-
void addError() {
291-
controller.addError('Error');
292-
}
290+
void addError() => controller.addError('Error');
293291

294292
@override
295293
Stream<ConnectivityResult> get onConnectivityChanged => controller.stream;
@@ -298,4 +296,10 @@ class TestConnectivityService implements Connectivity {
298296
Future<ConnectivityResult> checkConnectivity() {
299297
return Future.delayed(Duration.zero, () => initialConnection);
300298
}
299+
300+
@override
301+
Future<String> getWifiIP() async => '127.0.0.1';
302+
303+
@override
304+
Future<String> getWifiName() async => 'Localhost';
301305
}

0 commit comments

Comments
 (0)