CodeBlock constructor

const CodeBlock({
  1. Key? id,
  2. required String code,
  3. CodeLanguage language = CodeLanguage.plain,
  4. bool showLineNumbers = false,
  5. int firstLineNumber = 1,
  6. CodeTheme? theme,
  7. bool scrollable = false,
  8. CodeBlockState? state,
  9. 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');