listen property Null safety

Stream<PhoneCallEvent> listen

Implementation

Stream<PhoneCallEvent> get listen => _channel.receiveBroadcastStream().map(
      (event) => event is int
          ? PhoneCallEvent.values[event]
          : throw event.toString(),
    );