hasError property

bool get hasError

Returns true if the connection has an error

Implementation

bool get hasError => switch (this) {
  ConnectionError() => true,
  _ => false,
};