Skip to content

Commit aede70d

Browse files
committed
Buffer type support added.
Example updated (up to date).
1 parent 3da0a43 commit aede70d

File tree

6 files changed

+510
-226
lines changed

6 files changed

+510
-226
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.2.0
2+
* Added support for binary type (uses Uint8List). Format: binary12, binary64 etc. - any buffer length in bytes.
3+
* Example file is up to date now. (Message constructors require non-optional parameters).
4+
15
## v1.1.3
26
* Bugfix: concurrent modifications during iteration occurred in some cases while processing events.
37

example/example.dart

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -140,30 +140,30 @@ class MehModule extends Module<MehClient> {
140140
console.on('sendPackedMessage', (_, __) {
141141
/// GetResponse is just the name of response message of command Get.
142142
/// It's declared in example-users.generated.dart.
143-
final GetResponse message = GetResponse()
144-
..email = '${randomString()}@${randomString()}.com'
145-
..nickname = 'Mr. ${randomString()}'
146-
..hidden = false
147-
..created = DateTime.now()
148-
..info = (GetResponseInfo()
149-
..firstName = randomString()
150-
..lastName = randomString()
151-
..age = randomInt()
152-
)
153-
..social = (GetResponseSocial()
154-
..facebookId = randomInt() < 128 ? 'fbID_${randomString()}' : null
155-
..twitterId = randomInt() < 128 ? 'twID_${randomString()}' : null
156-
..instagramId = randomInt() < 128 ? 'inID_${randomString()}' : null
157-
)
158-
..stats = (GetResponseStats()
159-
..posts = randomInt()
160-
..comments = randomInt()
161-
..likes = randomInt() * 10
162-
..dislikes = randomInt()
163-
..rating = randomInt() / 25.5
164-
165-
)
166-
..sessions = <GetResponseSession>[];
143+
final GetResponse message = GetResponse(
144+
email: '${randomString()}@${randomString()}.com',
145+
nickname: 'Mr. ${randomString()}',
146+
hidden: false,
147+
created: DateTime.now(),
148+
info: GetResponseInfo(
149+
firstName: randomString(),
150+
lastName: randomString(),
151+
age: randomInt(),
152+
),
153+
social: GetResponseSocial(
154+
facebookId: randomInt() < 128 ? 'fbID_${randomString()}' : null,
155+
twitterId: randomInt() < 128 ? 'twID_${randomString()}' : null,
156+
instagramId: randomInt() < 128 ? 'inID_${randomString()}' : null,
157+
),
158+
stats: GetResponseStats(
159+
posts: randomInt(),
160+
comments: randomInt(),
161+
likes: randomInt() * 10,
162+
dislikes: randomInt(),
163+
rating: randomInt() / 25.5,
164+
),
165+
sessions: <GetResponseSession>[],
166+
);
167167
server.broadcast(message);
168168
log('Here is the message I sent:', MAGENTA);
169169
messageToStrings(message).forEach(log);

0 commit comments

Comments
 (0)