flutter_highlighter

Last updated:

0 purchases

flutter_highlighter Image
flutter_highlighter Images
Add to Cart

Description:

flutter highlighter

flutter_highlighter #

Syntax highlighter for Flutter.
Usage #
import 'package:flutter/material.dart';
import 'package:flutter_highlighter/flutter_highlighter.dart';
import 'package:flutter_highlighter/themes/github.dart';

class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
var code = '''main() {
print("Hello, World!");
}
''';

return HighlightView(
// The original code to be highlighted
code,

// Specify language
// It is recommended to give it a value for performance
language: 'dart',

// Specify highlight theme
// All available themes are listed in `themes` folder
theme: githubTheme,

// Specify padding
padding: EdgeInsets.all(12),

// Specify text style
textStyle: TextStyle(
fontFamily: 'My awesome monospace font',
fontSize: 16,
),
);
}
}
copied to clipboard
References #

All available languages
All available themes

License #
MIT

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.