errorMessage property

String get errorMessage

Gets the error message associated with the status.

Implementation

String get errorMessage => switch (this) {
      ErrorStatus<T, S> err when err.error != null =>
        err.error is String ? err.error as String : err.error.toString(),
      _ => ""
    };