errorMessage property

String get errorMessage

Gets the error message associated with the status.

Implementation

String get errorMessage {
  final bool isError = this is ErrorStatus;
  if (isError) {
    final ErrorStatus<T, S> err = this as ErrorStatus<T, S>;
    if (err.error != null) {
      if (err.error is String) {
        return err.error as String;
      }
      return err.error.toString();
    }
  }
  return "";
}