shamblett / mqtt_client

A server and browser based MQTT client for dart
Other
552 stars 179 forks source link

Three warnings #27

Closed josvos closed 6 years ago

josvos commented 6 years ago

The folliowing 3 (similar) warnings appear (Flutter dev 0.7.0, Dart 2.1.0-dev.1.0.flutter-69fce633b7, mqtt_client bd326b599db5d23d62023cfe83840aad12d5c2cd):

[...]/lib/src/connectionhandling/mqtt_client_mqtt_normal_connection.dart:29:26: Warning: Can't return a value from a void function.
compiler message:         return completer.complete();
compiler message:                          ^
[...]/lib/src/connectionhandling/mqtt_client_mqtt_ws_connection.dart:48:26: Warning: Can't return a value from a void function.
compiler message:         return completer.complete();
compiler message:                          ^
[...]/lib/src/connectionhandling/mqtt_client_mqtt_secure_connection.dart:68:26: Warning: Can't return a value from a void function.
compiler message:         return completer.complete();
compiler message:                          ^
shamblett commented 6 years ago

OK, please test under the newly released 3.0.0 client, see issue 24

josvos commented 6 years ago

New test with Flutter dev 0.7.1, Dart version 2.1.0-dev.1.0.flutter-ccb16f7282, mqtt_client f58a2fd879f00ce2ecedf52dc09a8ce8295b76ba: 3 warnings stay the same.

shamblett commented 6 years ago

OK, just complete the completer without returning, as in

completer.complete();

Works OK here

josvos commented 6 years ago

Did you change something? Which commit? Anyway, all warnings still are the same using git: https://github.com/shamblett/mqtt_client.git for dependency mqtt_client in pubspec.yaml.

shamblett commented 6 years ago

Nothing changed, just waiting to see if one of the flutter guys can test the above change, if it works I'll re-publish.

shamblett commented 6 years ago

Trial fix incorporated into release 3.1.0, please re-test

josvos commented 6 years ago

Works fine now, thanks!