fromString static method
- String status
Return a DriverTestMessage depending on status.
Implementation
static DriverTestMessage fromString(String status) {
  return switch (status) {
    'error' => DriverTestMessage.error(),
    'pending' => DriverTestMessage.pending(),
    'complete' => DriverTestMessage.complete(),
    _ => throw StateError('This type of status does not exist: $status'),
  };
}