CodeBlock constructor
const
CodeBlock({
- Key? id,
- required String code,
- CodeLanguage language = CodeLanguage.plain,
- bool showLineNumbers = false,
- int firstLineNumber = 1,
- CodeTheme? theme,
- bool scrollable = false,
- CodeBlockState? state,
- int pageStep = 5,
Implementation
const CodeBlock({
Key? id,
required this.code,
this.language = CodeLanguage.plain,
this.showLineNumbers = false,
this.firstLineNumber = 1,
this.theme,
this.scrollable = false,
this.state,
this.pageStep = 5,
}) : _id = id,
assert(!scrollable || state != null,
'CodeBlock(scrollable: true) requires a CodeBlockState');