homie_dart_on_mqtt_client 1.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

homie_dart_on_mqtt_client #

This library uses the mqtt_client package to implement a BrokerConnection for homie_dart. Most users want to use this packge instead of homie_dart, since it comes with all necessary mqtt logic. Users only need a dependency on this package, since it exports the homie_dart api. The BrokerConnection class added by this packages is MqttBrokerConnection

[1.2.0] - 15.08.2019 #

  • Added new exports, since homie_dart 2.0.1 introduces new libraries
  • Support for homie_dart 2.0.1

[1.1.1] - 29.07.2019 #

  • Throw a StateError if connect is called a second time on the same MqttBrokerConnection instance

[1.1.0] - 26.07.2019 #

  • Added possibility to use credentials (username and password) when connecting a mqtt broker

[1.0.0] - 07.07.2019 #

  • Initial public release


import 'package:homie_dart_on_mqtt_client/homie_dart_on_mqtt_client.dart';
import '../../homie_dart/example/example.dart';

Future<Null> main() async {
  BrokerConnection con=new MqttBrokerConnection(server: 'hpserver',port: 1883);
  await test(con);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  homie_dart_on_mqtt_client: ^1.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:homie_dart_on_mqtt_client/homie_dart_on_mqtt_client.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 4, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/homie_dart_on_mqtt_client.dart. (-8.17 points)

Analysis of lib/homie_dart_on_mqtt_client.dart reported 17 hints, including:

line 39 col 24: Unnecessary new keyword.

line 41 col 28: Unnecessary new keyword.

line 43 col 13: Unnecessary new keyword.

line 44 col 31: Unnecessary new keyword.

line 53 col 13: Unnecessary new keyword.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (mqtt_client).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
homie_dart ^2.0.1 2.0.2
meta ^1.1.7 1.1.8
mqtt_client ^5.5.3 5.6.3 6.1.0
typed_data ^1.1.6 1.1.6
Transitive dependencies
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.4
event_bus 1.1.1
path 1.6.4
pedantic 1.9.0