flutter_highlighter
0.1.1, released 5 years ago by magnificsoftware.com
Syntax highlighting widget for Flutter with multiple languages and themes.
WASM-ready
What it does
Provides a HighlightView widget that renders source code with syntax highlighting using a specified programming language and theme. It supports numerous languages and themes out of the box.
AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display source code with syntax highlighting in your Flutter application.
- You want support for multiple programming languages and built-in themes.
Skip it when
- You need an advanced code editor with syntax editing capabilities rather than static viewing.
- Performance on extremely large code files is a concern without virtualization.
Strengths
- Supports a wide range of programming languages and themes.
- Easy to use widget-based API.
- Migrated to null-safety.
Weaknesses
- Limited documentation beyond basic usage examples.
- Performance can be impacted on very large inputs if language is not specified.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
HighlightView(
'main() { print("Hello, World!"); }',
language: 'dart',
theme: githubTheme,
padding: EdgeInsets.all(12),
textStyle: TextStyle(
fontFamily: 'Monospace',
fontSize: 16,
),
)Alternatives
Packages that do the same job and could replace flutter_highlighter.
- val_highlight
Syntax highlighter in pure Dart for 55 languages, themes, incremental updates, and HTML output.
80Compare - xdg_icons
XDG theme icons for Flutter.
62Compare