AnySyntaxHighlighter constructor

const AnySyntaxHighlighter(
  1. String text, {
  2. Key? key,
  3. TextAlign textAlign = TextAlign.start,
  4. TextDirection? textDirection,
  5. bool softWrap = true,
  6. TextOverflow overflow = TextOverflow.clip,
  7. double textScaleFactor = 1.0,
  8. int? maxLines,
  9. Locale? locale,
  10. StrutStyle? strutStyle,
  11. TextWidthBasis textWidthBasis = TextWidthBasis.parent,
  12. TextHeightBehavior? textHeightBehavior,
  13. double padding = 2,
  14. double margin = 0,
  15. bool isSelectableText = false,
  16. AnySyntaxHighlighterTheme theme = const AnySyntaxHighlighterTheme(),
  17. double? fontSize,
  18. String? useGoogleFont,
  19. Set<String> reservedWordSets = const {'java', 'python', 'c', 'cpp', 'c#', 'dart', 'go', 'javascript', 'r', 'swift', 'bash', 'ruby'},
  20. bool lineNumbers = false,
  21. bool hasCopyButton = false,
  22. Icon copyIcon = const Icon(Icons.copy_rounded, color: Colors.white),
  23. Decoration? overrideDecoration,
})

AnySyntaxHighlighter Widget constructor

Implementation

const AnySyntaxHighlighter(this.text,
    {Key? key,
    this.textAlign = TextAlign.start,
    this.textDirection,
    this.softWrap = true,
    this.overflow = TextOverflow.clip,
    this.textScaleFactor = 1.0,
    this.maxLines,
    this.locale,
    this.strutStyle,
    this.textWidthBasis = TextWidthBasis.parent,
    this.textHeightBehavior,
    this.padding = 2,
    this.margin = 0,
    this.isSelectableText = false,
    this.theme = const AnySyntaxHighlighterTheme(),
    this.fontSize,
    this.useGoogleFont,
    this.reservedWordSets = const {
      'java',
      'python',
      'c',
      'cpp',
      'c#',
      'dart',
      'go',
      'javascript',
      'r',
      'swift',
      'bash',
      'ruby'
    },
    this.lineNumbers = false,
    this.hasCopyButton = false,
    this.copyIcon = const Icon(
      Icons.copy_rounded,
      color: Colors.white,
    ),
    this.overrideDecoration})
    : super(key: key);