Message constructor

Message({
  1. required String to,
  2. @required dynamic data,
  3. String? resp,
})

Constructs a new Message instance. to is the target topic. data is the message data. resp is the optional response topic.

Implementation

Message({required String to, @required dynamic data, String? resp})
    : this._full(
          to: to,
          resp: resp,
          data: data,
          sticky: false,
          creation: DateTime.now().millisecondsSinceEpoch);