toString method Null safety

String toString ()
override

Returns a string representation of this object.

Implementation

String toString() {
  if (message != null) {
    return "Assertion failed: ${Error.safeToString(message)}";
  }
  return "Assertion failed";
}