Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 8dc5202

Browse files
author
Ajay Kumar
committed
Health suggestions
1 parent d544991 commit 8dc5202

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.0.1] - Health suggestions.
2+
3+
* Health suggestions.
4+
15
## [1.0.1] - Updated Connectivity Service.
26

37
* Updated Connectivity Service.

lib/src/service/connectivity_service.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'dart:io';
44
import 'package:connectivity_wrapper/src/utils/constants.dart';
55

66
class ConnectivityService {
7-
static final List<AddressCheckOptions> DEFAULT_ADDRESSES = List.unmodifiable([
7+
static final List<AddressCheckOptions> defaultAddresses = List.unmodifiable([
88
AddressCheckOptions(
99
InternetAddress('1.1.1.1'),
1010
port: DEFAULT_PORT,
@@ -22,7 +22,7 @@ class ConnectivityService {
2222
),
2323
]);
2424

25-
List<AddressCheckOptions> addresses = DEFAULT_ADDRESSES;
25+
List<AddressCheckOptions> addresses = defaultAddresses;
2626

2727
factory ConnectivityService() => _instance;
2828

@@ -71,9 +71,7 @@ class ConnectivityService {
7171
}
7272

7373
Future<ConnectivityStatus> get connectionStatus async {
74-
return await hasConnection
75-
? ConnectivityStatus.CONNECTED
76-
: ConnectivityStatus.DISCONNECTED;
74+
return await hasConnection ? ConnectivityStatus.CONNECTED : ConnectivityStatus.DISCONNECTED;
7775
}
7876

7977
Duration checkInterval = DEFAULT_INTERVAL;
@@ -97,8 +95,7 @@ class ConnectivityService {
9795
ConnectivityStatus _lastStatus;
9896
Timer _timerHandle;
9997

100-
StreamController<ConnectivityStatus> _statusController =
101-
StreamController.broadcast();
98+
StreamController<ConnectivityStatus> _statusController = StreamController.broadcast();
10299

103100
Stream<ConnectivityStatus> get onStatusChange => _statusController.stream;
104101

0 commit comments

Comments
 (0)