flutter_syntax_highlight 0.2.0
flutter_syntax_highlight: ^0.2.0 copied to clipboard
Dart-only syntax highlighting in two layers: a pure-Dart tokenizer underneath and a thin widget on top. The tokens rejoin into the exact input, byte for byte.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add flutter_syntax_highlightThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
flutter_syntax_highlight: ^0.2.0Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:flutter_syntax_highlight/flutter_syntax_highlight.dart';