https://github.com/hengkysteen/flutter_highlight_fork
Flutter Code Syntax highlighting
https://github.com/hengkysteen/flutter_highlight_fork
flutter flutter-packages
Last synced: 3 months ago
JSON representation
Flutter Code Syntax highlighting
- Host: GitHub
- URL: https://github.com/hengkysteen/flutter_highlight_fork
- Owner: hengkysteen
- License: mit
- Created: 2025-01-21T21:15:11.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-21T21:42:29.000Z (5 months ago)
- Last Synced: 2025-01-21T22:29:25.518Z (5 months ago)
- Topics: flutter, flutter-packages
- Language: Dart
- Homepage:
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_highlight_fork
This repository is a fork of the [flutter_highlight](https://github.com/git-touch/highlight.dart/tree/master/flutter_highlight) project.
### Fork changes
- SelectionArea Support :
Replacing `RichText` to `Text.rich` to enable text selection.- Header:
Added a header that displays the programming language and supports custom widgets, with dynamic colors derived from `themeMap`.- Add lazyLanguages:
Optimized the Mode class instantiation to reduce the number of instances created.Original :
![]()
Fork :
![]()
## Getting Started
### Add dependency
```yml
dependencies:
flutter_highlight_fork:
git:
url: https://github.com/hengkysteen/flutter_highlight_fork.git
ref: v0.0.1
```### Usage
```dart
import 'package:flutter_highlight_fork/flutter_highlight_fork.dart';SelectionArea(
child: HighlightViewFork(
"void main()",
language: "dart",
),
),
```or copy complete example from `example/main.dart` and run it.
## References
- [highlight](https://github.com/git-touch/highlight.dart)
- [All available languages](https://github.com/git-touch/highlight.dart/tree/master/highlight/lib/languages)
- [All available themes](https://github.com/git-touch/highlight.dart/tree/master/flutter_highlight/lib/themes)