From 16de37adb340e8e39e7795923273bf2d6e6a056b Mon Sep 17 00:00:00 2001 From: Jumper Chen Date: Thu, 16 Jan 2020 14:46:30 +0800 Subject: [PATCH] Fix rikulo/socket.io-client-dart#51 --- CHANGELOG.md | 5 +++++ lib/src/engine/parser/parser.dart | 2 +- pubspec.yaml | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6130024 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +## 0.9.1 + +**Bug fix:** + +* [socket.io-client-dart#51](https://github.com/rikulo/socket.io-client-dart/issues/51) Issues with ArrayBuffer in Flutter Web diff --git a/lib/src/engine/parser/parser.dart b/lib/src/engine/parser/parser.dart index c075e7d..5e76f10 100644 --- a/lib/src/engine/parser/parser.dart +++ b/lib/src/engine/parser/parser.dart @@ -157,7 +157,7 @@ class PacketParser { } // Binary data - if (binaryType == 'arraybuffer') { + if (binaryType == 'arraybuffer' || data is ByteBuffer) { // wrap Buffer/ArrayBuffer data into an Uint8Array var intArray = (data as ByteBuffer).asUint8List(); type = intArray[0]; diff --git a/pubspec.yaml b/pubspec.yaml index 37a620f..592de3b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,10 @@ name: socket_io_common description: Socket.io common parser library. -version: 0.9.0+5 +version: 0.9.1 author: jumperchen homepage: https://www.zkoss.org +repository: https://github.com/rikulo/socket_io_common +issue_tracker: https://github.com/rikulo/socket_io_common/issues environment: sdk: '>=2.0.0 <3.0.0'