StatusInfo constructor

StatusInfo(
  1. Map event
)

Creates a StatusInfo instance using the provided event data.

The event should be a map containing raw data from a StatusEvent. This constructor extracts and assigns the relevant data fields to the corresponding properties.

Implementation

StatusInfo(Map<dynamic, dynamic> event) {
  _setStatusType(event);

  // If the status event is a STOP event, set the error type.
  if (type == StatusType.STOP) {
    _setStatusErrorType(event);
  }
}