fromMap static method

Message fromMap(
  1. dynamic m
)

Implementation

static Message fromMap(dynamic m) {
  if (m is Message) return m;

  return Message._full(
    to: m['to'],
    resp: m['resp'],
    data: m['data'],
    sticky: m['sticky'] ?? false,
    creation: m['creation'] ?? DateTime.now().millisecondsSinceEpoch,
  );
}