I want to display the content of this url in flutter application with code viewer, is that possible to do that? I am not talking about only dart code.
I tried to show it with flutter_markdown, and I think it is basic
I want to display the content of this url in flutter application with code viewer, is that possible to do that? I am not talking about only dart code.
I tried to show it with flutter_markdown, and I think it is basic
you can use syntax_highlighter package.
dependencies:
syntax_highlighter: ^1.0.0
import 'package:syntax_highlighter/syntax_highlighter.dart';
To display a block of code, use SyntaxHighlighter widget. You can specify the language of the code using the language parameter, and the actual code to be displayed using the text parameter. like example:
SyntaxHighlighter(
language: 'dart',
text: '''
void main() {
print('Hello!');
}
''',
)