highlighting 0.8.0 copy "highlighting: ^0.8.0" to clipboard
highlighting: ^0.8.0 copied to clipboard

Syntax highlighting for Dart with lots of languages and themes support.

example/main.dart

import 'package:highlighting/highlighting_core.dart' show highlight;
import 'package:highlighting/languages/dart.dart';

void main() {
  var source = '''main() {
  print("Hello, World!");
}
''';

  highlight.registerLanguage('dart', dart);

  var result = highlight.parse(source, language: 'dart');
  var html = result.toHtml();
  print(html); // HTML string
}
6
likes
0
pub points
79%
popularity

Publisher

verified publisherakvelon.com

Syntax highlighting for Dart with lots of languages and themes support.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, equatable, tuple

More

Packages that depend on highlighting