highlighting 0.9.0+11.8.0 copy "highlighting: ^0.9.0+11.8.0" to clipboard
highlighting: ^0.9.0+11.8.0 copied to clipboard

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

example/main.dart

import 'package:highlighting/highlighting.dart';
import 'package:highlighting/languages/dart.dart';

void main() {
  final source = '''main() {
  print('Highlighting by Akvelon.');
}
''';

  highlight.registerLanguage(dart);

  final highlighted = highlight.parse(source, languageId: dart.id);
  final html = highlighted.toHtml();
  print(html); // HTML string
}
6
likes
130
points
3
downloads

Publisher

verified publisherakvelon.com

Weekly Downloads

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

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

collection, equatable, meta, tuple

More

Packages that depend on highlighting