Skip to content

Commit

Permalink
Merge pull request #15 from RikitoNoto/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0
  • Loading branch information
RikitoNoto committed Jun 30, 2023
2 parents 8035f4b + 616699f commit f614194
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
create initial release.
## 1.1.0
Changed the import file to be only camel.dart
## 1.2.0
made it possible to omit the command argument of the Message class.
4 changes: 2 additions & 2 deletions lib/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ class Message {

/// constructor from params(send data).
Message.fromBody({
required String command,
String? command,
required this.body,
}) {
header = MessageHeader.fromParam(command: command, bodySize: body.length);
header = MessageHeader.fromParam(command: command ?? "", bodySize: body.length);
}
}

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: camel
description: A Flutter package for communicating in a local network.
version: 1.1.0
version: 1.2.0
homepage:

environment:
Expand Down
4 changes: 2 additions & 2 deletions test/message_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void messageFormatTest() {
}

Message constructMessageFromBody(
{required String command, required String body}) {
{String? command, required String body}) {
return Message.fromBody(
command: command, body: body); //Uint8List.fromList(utf8.encode(body)));
}
Expand All @@ -253,7 +253,7 @@ void checkMessageCommandAndBody(
void messageConstructFromSendTest() {
group("constructor from sender", () {
test("should be construct message command and body", () {
Message message = constructMessageFromBody(command: "", body: "");
Message message = constructMessageFromBody(body: "");
checkMessageCommandAndBody(message: message, command: "", body: "");
});

Expand Down

0 comments on commit f614194

Please sign in to comment.