String toString()

in lib/src/span_exception.dart [83:101]


  String toString({color, String? secondaryColor}) {
    if (span == null) return message;

    var useColor = false;
    String? primaryColor;
    if (color is String) {
      useColor = true;
      primaryColor = color;
    } else if (color == true) {
      useColor = true;
    }

    final formatted = span!.messageMultiple(
        message, primaryLabel, secondarySpans,
        color: useColor,
        primaryColor: primaryColor,
        secondaryColor: secondaryColor);
    return 'Error on $formatted';
  }