Skip to content
pubscout

val_highlight_flutter

0.1.2, released 2 weeks ago by useval.io

Flutter widgets for displaying and editing syntax-highlighted code.

WASM-readyUses material_ui
$ flutter pub add val_highlight_flutter
Source repository

What it does

Provides CodeView for rendering syntax-highlighted source code with optional line numbers and wrapping, and CodeField for editing code with features like auto-closing brackets and comment toggling.

AI-written summary of version 0.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display syntax-highlighted code blocks in your app.
  • You are building a code editor or scratchpad interface within Flutter.

Skip it when

  • You just need a plain multiline text field without code editing enhancements.

Strengths

  • Smooth performance on large files with lazy rendering and background isolates.
  • Includes editing features like bracket auto-closing, smart indentation, and comment toggling.
  • Supports 55 languages and customizable themes.

Weaknesses

  • Coloured window movement in large CodeFields can occasionally cause layout recalculations.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
CodeView(source, language: dartLanguage)

Alternatives

Packages that do the same job and could replace val_highlight_flutter.

  • code_editor

    A Flutter code editor widget with syntax highlighting, custom themes, and file navigation.

  • re_editor

    A lightweight text and code editor widget for Flutter with syntax highlighting and folding.

  • flutter_highlight

    A Flutter widget that highlights source code with many languages and themes.

  • re_highlight

    Powerful text syntax highlighting library translated from highlightjs.

Works with

Packages commonly used together with val_highlight_flutter: ones it builds on, ones built on it, and its own family.