flutter_syntax_view 1.0.0

Flutter Android iOS web

A SyntaxView Widget which highlights code text according to the programming language syntax using Native Dart code.

flutter_syntax_view #

A SyntaxView Widget which highlights code text according to the programming language syntax using Native Dart code.

Usage #

  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,
        syntax: Syntax.DART,
        syntaxTheme: SyntaxTheme.dracula(),
        withZoom: true,
        withLinesCount: true,
      );

Supported Syntax #

  • [x] Dart
  • [x] Java
  • [x] Kotlin
  • [x] Swift
  • [x] JavaScript
  • More will be added.

Themes #

TODO #

  • [ ] Add More Syntax Support.
  • [ ] Add More Themes.

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 #

Installing #

Package

Features and bugs #

If you face any problems feel free to open an issue at the issue tracker. If you feel the library is missing a feature, please raise a ticket on Github. Pull request are also welcome.

15
likes
100
pub points
82%
popularity

A SyntaxView Widget which highlights code text according to the programming language syntax using Native Dart code.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

badereddineouaich@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, string_scanner

More

Packages that depend on flutter_syntax_view