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
}
3
likes
110
pub points
78%
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