toInt method
Implementation
int toInt() => switch (this) {
    NetworkEvent.protocolVersionMismatch => 0,
    NetworkEvent.peerSetChange => 1,
  };int toInt() => switch (this) {
    NetworkEvent.protocolVersionMismatch => 0,
    NetworkEvent.peerSetChange => 1,
  };