diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..880fea0 Binary files /dev/null and b/assets/icon.png differ diff --git a/lib/tools/mqtt_core.dart b/lib/tools/mqtt_core.dart index e032838..e9d9085 100644 --- a/lib/tools/mqtt_core.dart +++ b/lib/tools/mqtt_core.dart @@ -131,14 +131,14 @@ class MqttCore { publishText(String subtopic, String text) { try { - var compressedText = GZipCodec().encode(utf8.encode(text)); + var buffer = Uint8Buffer(); + buffer.addAll(utf8.encode(text)); - var mqttBuffer = Uint8Buffer(); - mqttBuffer.addAll(compressedText); + _mqttClient.publishMessage(subtopic, MqttQos.exactlyOnce, buffer); var topic = "$_toServerTopic$subtopic/$_clientId"; - _mqttClient.publishMessage( topic, MqttQos.exactlyOnce, mqttBuffer); + _mqttClient.publishMessage( topic, MqttQos.exactlyOnce, buffer); Util.logInfo("send message $text to $topic"); } catch (e) { diff --git a/pubspec.lock b/pubspec.lock index dc4ebfd..249c53a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -217,6 +217,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" clock: dependency: transitive description: @@ -446,6 +454,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.6.12" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + url: "https://pub.dev" + source: hosted + version: "0.13.1" flutter_link_previewer: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d8362be..44d9f98 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,6 +67,7 @@ dependencies: expandable: ^5.0.1 url_launcher: ^6.2.4 audioplayers: ^5.2.1 + flutter_launcher_icons: ^0.13.1 dev_dependencies: flutter_test: @@ -86,6 +87,12 @@ dev_dependencies: # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec +flutter_launcher_icons: + android: "assets/icon.png" + ios: true + image_path: "assets/icon.png" + min_sdk_android: 21 + # The following section is specific to Flutter packages. flutter: