Skip to content

Commit

Permalink
Fix dart analyzer warning for formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Jul 31, 2020
1 parent 2b6387f commit 5297bbf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.10+2

* Fix dart analyzer warning for formatting issues.

## 0.9.10+1

* Fix dart analyzer warning.
Expand Down
9 changes: 3 additions & 6 deletions lib/src/engine/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ class Socket extends EventEmitter {
'jsonp': options['jsonp'] ?? jsonp,
'forceBase64': options['forceBase64'] ?? forceBase64,
'enablesXDR': options['enablesXDR'] ?? enablesXDR,
'timestampRequests':
options['timestampRequests'] ?? timestampRequests,
'timestampRequests': options['timestampRequests'] ?? timestampRequests,
'timestampParam': options['timestampParam'] ?? timestampParam,
'policyPort': options['policyPort'] ?? policyPort,
// 'pfx: options.pfx || this.pfx,
Expand All @@ -227,8 +226,7 @@ class Socket extends EventEmitter {
// 'ca: options.ca || this.ca,
// 'ciphers: options.ciphers || this.ciphers,
// 'rejectUnauthorized: options.rejectUnauthorized || this.rejectUnauthorized,
'perMessageDeflate':
options['perMessageDeflate'] ?? perMessageDeflate,
'perMessageDeflate': options['perMessageDeflate'] ?? perMessageDeflate,
'extraHeaders': options['extraHeaders'] ?? extraHeaders,
// 'forceNode: options.forceNode || this.forceNode,
// 'localAddress: options.localAddress || this.localAddress,
Expand Down Expand Up @@ -469,8 +467,7 @@ class Socket extends EventEmitter {
break;
}
} else {
_logger
.fine('packet received with socket readyState "${readyState}"');
_logger.fine('packet received with socket readyState "${readyState}"');
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/src/engine/transport/transport.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ abstract class Transport extends EventEmitter {
/// @param {String} data
/// @api private
void onData(data) {
var packet =
PacketParser.decodePacket(data, binaryType: socket.binaryType);
var packet = PacketParser.decodePacket(data, binaryType: socket.binaryType);
onPacket(packet);
}

Expand Down
3 changes: 1 addition & 2 deletions lib/src/engine/transport/xhr_transport.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ class XHRTransport extends PollingTransport {
@override
void doWrite(data, fn) {
var isBinary = data is! String;
var req =
request({'method': 'POST', 'data': data, 'isBinary': isBinary});
var req = request({'method': 'POST', 'data': data, 'isBinary': isBinary});
req.on('success', fn);
req.on('error', (err) {
onError('xhr post error', err);
Expand Down
7 changes: 2 additions & 5 deletions lib/src/manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class Manager extends EventEmitter {
subs = [];
this.options = options;
reconnection = options['reconnection'] != false;
reconnectionAttempts =
options['reconnectionAttempts'] ?? double.infinity;
reconnectionAttempts = options['reconnectionAttempts'] ?? double.infinity;
reconnectionDelay = options['reconnectionDelay'] ?? 1000;
reconnectionDelayMax = options['reconnectionDelayMax'] ?? 5000;
randomizationFactor = options['randomizationFactor'] ?? 0.5;
Expand Down Expand Up @@ -179,9 +178,7 @@ class Manager extends EventEmitter {
///
void maybeReconnectOnOpen() {
// Only try to reconnect if it's the first time we're connecting
if (!reconnecting &&
_reconnection &&
backoff.attempts == 0) {
if (!reconnecting && _reconnection && backoff.attempts == 0) {
// keeps reconnection from firing twice for the same reconnection loop
reconnect();
}
Expand Down
4 changes: 1 addition & 3 deletions lib/src/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ class Socket extends EventEmitter {
var packet = {
'type': binary ? BINARY_EVENT : EVENT,
'data': sendData,
'options': {
'compress': flags?.isNotEmpty == true && flags['compress']
}
'options': {'compress': flags?.isNotEmpty == true && flags['compress']}
};

// event ack callback
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: socket_io_client
description: Dartlang port of socket.io-client for web, flutter, dartvm to use
version: 0.9.10+1
version: 0.9.10+2
homepage: https://www.zkoss.org
repository: https://github.com/rikulo/socket.io-client-dart
issue_tracker: https://github.com/rikulo/socket.io-client-dart/issues
Expand Down

0 comments on commit 5297bbf

Please sign in to comment.