This could be a one-liner: `String toString() => "SparkError($errorcode)" + (message != null) ? ": $message" : "";` Feel free to ignore this, though.