highlighting 0.8.1+11.7.0 copy "highlighting: ^0.8.1+11.7.0" to clipboard
highlighting: ^0.8.1+11.7.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', dart);

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

Publisher

verified publisherakvelon.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, equatable, meta, tuple

More

Packages that depend on highlighting