Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baderouaich/flutter_syntax_view
Flutter Syntax Highlighter
https://github.com/baderouaich/flutter_syntax_view
code-highlighter dart flutter flutter-package syntax-highlighting
Last synced: 5 days ago
JSON representation
Flutter Syntax Highlighter
- Host: GitHub
- URL: https://github.com/baderouaich/flutter_syntax_view
- Owner: baderouaich
- License: mit
- Created: 2019-04-27T15:15:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T17:26:20.000Z (5 months ago)
- Last Synced: 2024-12-14T05:06:25.960Z (12 days ago)
- Topics: code-highlighter, dart, flutter, flutter-package, syntax-highlighting
- Language: Dart
- Homepage:
- Size: 1.24 MB
- Stars: 95
- Watchers: 4
- Forks: 29
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_syntax_view
Flutter Syntax Highlighter
## Usage
```dart
String code = """
// Importing core libraries
import 'dart:math';
int fibonacci(int n) {
if (n == 0 || n == 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
var result = fibonacci(20);
/* and there
you have it! */
""";SyntaxView(
code: code, // Code text
syntax: Syntax.DART, // Language
syntaxTheme: SyntaxTheme.vscodeDark(), // Theme
fontSize: 12.0, // Font size
withZoom: true, // Enable/Disable zoom icon controls
withLinesCount: true, // Enable/Disable line number
expanded: false, // Enable/Disable container expansion
selectable: true // Enable/Disable code text selection
)
```## Supported Syntax
- [x] Dart
- [x] C
- [x] C++
- [x] Java
- [x] Kotlin
- [x] Swift
- [x] JavaScript
- [x] YAML## Themes
## Installing
[Package](https://pub.dartlang.org/packages/flutter_syntax_view)
## Contributing
- if you are familiar with Regular Expressions in Dart and would like contribute in adding further syntax support. it will be very appreciated!
## Contributors ✨
Thanks goes to these wonderful people!## Features and bugs
If you face any problems feel free to open an issue at the [issue tracker][tracker]. If you feel the library is missing a feature, please raise a ticket on Github. Pull request are also welcome.
[tracker]: https://github.com/BaderEddineOuaich/flutter_syntax_view/issues