toString method Null safety

String toString ()
override

Returns a string representation of this object.

Implementation

String toString() {
  var variableName = this.variableName;
  return variableName == null
      ? "Reading static variable during its initialization"
      : "Reading static variable '$variableName' during its initialization";
}