fromMap static method

DataEvent fromMap(
  1. dynamic data
)

Construct a new DataEvent.

Should only be used internally.

Implementation

static DataEvent fromMap(dynamic data) {
  return DataEvent._(
    data['to'],
    data['from'],
    data['type'] != null && data['type'] == 'user'
        ? DataEventType.user
        : DataEventType.system,
    data['data'],
  );
}