message property

String get message

Convenience: get message regardless of outcome.

Implementation

String get message => switch (this) {
      ApiSuccess<T> s => s.message,
      ApiError<T> e => e.message,
    };