Skip to content

Commit 5297bbf

Browse files
committed
Fix dart analyzer warning for formatting issues.
1 parent 2b6387f commit 5297bbf

File tree

7 files changed

+13
-19
lines changed

7 files changed

+13
-19
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.10+2
2+
3+
* Fix dart analyzer warning for formatting issues.
4+
15
## 0.9.10+1
26

37
* Fix dart analyzer warning.

lib/src/engine/socket.dart

+3-6
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ class Socket extends EventEmitter {
216216
'jsonp': options['jsonp'] ?? jsonp,
217217
'forceBase64': options['forceBase64'] ?? forceBase64,
218218
'enablesXDR': options['enablesXDR'] ?? enablesXDR,
219-
'timestampRequests':
220-
options['timestampRequests'] ?? timestampRequests,
219+
'timestampRequests': options['timestampRequests'] ?? timestampRequests,
221220
'timestampParam': options['timestampParam'] ?? timestampParam,
222221
'policyPort': options['policyPort'] ?? policyPort,
223222
// 'pfx: options.pfx || this.pfx,
@@ -227,8 +226,7 @@ class Socket extends EventEmitter {
227226
// 'ca: options.ca || this.ca,
228227
// 'ciphers: options.ciphers || this.ciphers,
229228
// 'rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized,
230-
'perMessageDeflate':
231-
options['perMessageDeflate'] ?? perMessageDeflate,
229+
'perMessageDeflate': options['perMessageDeflate'] ?? perMessageDeflate,
232230
'extraHeaders': options['extraHeaders'] ?? extraHeaders,
233231
// 'forceNode: options.forceNode || this.forceNode,
234232
// 'localAddress: options.localAddress || this.localAddress,
@@ -469,8 +467,7 @@ class Socket extends EventEmitter {
469467
break;
470468
}
471469
} else {
472-
_logger
473-
.fine('packet received with socket readyState "${readyState}"');
470+
_logger.fine('packet received with socket readyState "${readyState}"');
474471
}
475472
}
476473

lib/src/engine/transport/transport.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ abstract class Transport extends EventEmitter {
117117
/// @param {String} data
118118
/// @api private
119119
void onData(data) {
120-
var packet =
121-
PacketParser.decodePacket(data, binaryType: socket.binaryType);
120+
var packet = PacketParser.decodePacket(data, binaryType: socket.binaryType);
122121
onPacket(packet);
123122
}
124123

lib/src/engine/transport/xhr_transport.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ class XHRTransport extends PollingTransport {
8484
@override
8585
void doWrite(data, fn) {
8686
var isBinary = data is! String;
87-
var req =
88-
request({'method': 'POST', 'data': data, 'isBinary': isBinary});
87+
var req = request({'method': 'POST', 'data': data, 'isBinary': isBinary});
8988
req.on('success', fn);
9089
req.on('error', (err) {
9190
onError('xhr post error', err);

lib/src/manager.dart

+2-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ class Manager extends EventEmitter {
5656
subs = [];
5757
this.options = options;
5858
reconnection = options['reconnection'] != false;
59-
reconnectionAttempts =
60-
options['reconnectionAttempts'] ?? double.infinity;
59+
reconnectionAttempts = options['reconnectionAttempts'] ?? double.infinity;
6160
reconnectionDelay = options['reconnectionDelay'] ?? 1000;
6261
reconnectionDelayMax = options['reconnectionDelayMax'] ?? 5000;
6362
randomizationFactor = options['randomizationFactor'] ?? 0.5;
@@ -179,9 +178,7 @@ class Manager extends EventEmitter {
179178
///
180179
void maybeReconnectOnOpen() {
181180
// Only try to reconnect if it's the first time we're connecting
182-
if (!reconnecting &&
183-
_reconnection &&
184-
backoff.attempts == 0) {
181+
if (!reconnecting && _reconnection && backoff.attempts == 0) {
185182
// keeps reconnection from firing twice for the same reconnection loop
186183
reconnect();
187184
}

lib/src/socket.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ class Socket extends EventEmitter {
155155
var packet = {
156156
'type': binary ? BINARY_EVENT : EVENT,
157157
'data': sendData,
158-
'options': {
159-
'compress': flags?.isNotEmpty == true && flags['compress']
160-
}
158+
'options': {'compress': flags?.isNotEmpty == true && flags['compress']}
161159
};
162160

163161
// event ack callback

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: socket_io_client
22
description: Dartlang port of socket.io-client for web, flutter, dartvm to use
3-
version: 0.9.10+1
3+
version: 0.9.10+2
44
homepage: https://www.zkoss.org
55
repository: https://github.com/rikulo/socket.io-client-dart
66
issue_tracker: https://github.com/rikulo/socket.io-client-dart/issues

0 commit comments

Comments
 (0)