highlights_plugin 0.2.0 copy "highlights_plugin: ^0.2.0" to clipboard
highlights_plugin: ^0.2.0 copied to clipboard

Dart implementation of highlights syntax highlighting engine.

highlights_plugin #

Dart implementation of highlights KMP engine:
https://github.com/SnipMeDev/Highlights

Installation #

flutter pub add highlights_plugin

Usage #

final plugin = HighlightsPlugin(debug: true);

// ['kotlin', 'dart', 'swift', 'php', 'java', ...]
final languages = await plugin.getLanguages();
// ['monokai', 'darcula', 'notepad', ...]
final themes = await plugin.getThemes();
// Bold Hello
final emphasis = PhraseLocation(start: 3, length: 8);
// List with ColorHighlight or BoldHighlight  
final result = await plugin.getHighlights(
  '// Hello, World!',
  languages.first,
  themes.first,
  [emphasis],
);

Features #

  • 17 supported languages (Kotlin, Dart, Swift, PHP, etc)
  • Light / dark mode
  • 6 built-in themes
  • Phrase bolding (emphasis)
  • Result caching and support for incremental changes

Support #

  • Android βœ…
  • iOS βœ…
  • macOS πŸ”΄ (Not yet)
  • Linux πŸ”΄ (Not yet)
  • Windows πŸ”΄ (Not yet)
  • Web πŸ”΄ (Not yet)

License πŸ–‹οΈ #

Copyright 2024 Tomasz KΔ…dzioΕ‚ka.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1
likes
130
points
29
downloads

Publisher

verified publishertkadziolka.pl

Weekly Downloads

Dart implementation of highlights syntax highlighting engine.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

collection, flutter, flutter_web_plugins, json_annotation, plugin_platform_interface

More

Packages that depend on highlights_plugin