DataWedgeEvent.fromEvent constructor Null safety

DataWedgeEvent.fromEvent(
  1. dynamic event
)

Implementation

factory DataWedgeEvent.fromEvent(dynamic event) {
  Map eventObj = jsonDecode(event as String);
  String type = eventObj[EVENT_NAME];

  switch (type) {
    case SCANNER_STATUS:

      break;
    default:
  }

  DataWedgeEvent dataWedgeEvent = DataWedgeEvent();
  return dataWedgeEvent;
}