highlight 0.7.0 highlight: ^0.7.0 copied to clipboard
Syntax highlighting for Dart with lots of languages and themes support.
import 'package:highlight/highlight.dart' show highlight;
void main() {
var source = '''main() {
print("Hello, World!");
}
''';
var result = highlight.parse(source, language: 'dart');
var html = result.toHtml();
print(html); // HTML string
}