widget/blocks/leaf/code_block library

Classes

CodeBlockNode
Tag: MarkdownTag.pre
PreConfig
config class for pre

Functions

convertHiNodes(List<Node> nodes, Map<String, TextStyle> theme, TextStyle? style, TextStyle? styleNotMatched) List<TextSpan>
highLightSpans(String input, {String? language, bool autoDetectionLanguage = false, Map<String, TextStyle> theme = const {}, TextStyle? textStyle, TextStyle? styleNotMatched, int tabSize = 8}) List<InlineSpan>
transform code to highlight code

Typedefs

CodeBuilder = Widget Function(String code, String language)
CodeWrapper = Widget Function(Widget child, String code, String language)