highlight method

String highlight ({dynamic color })

Prints the text associated with this span in a user-friendly way.

This is identical to message, except that it doesn't print the file name, line number, column number, or message. If length is 0 and this isn't a SourceSpanWithContext, returns an empty string.

color may either be a String, a bool, or null. If it's a string, it indicates an ANSII terminal color escape that should be used to highlight the span's text. If it's true, it indicates that the text should be highlighted using the default color. If it's false or null, it indicates that the text shouldn't be highlighted.

Implementation

String highlight({color});