AnySyntaxHighlighter constructor
const
AnySyntaxHighlighter(
- String text, {
- Key? key,
- TextAlign textAlign = TextAlign.start,
- TextDirection? textDirection,
- bool softWrap = true,
- TextOverflow overflow = TextOverflow.clip,
- double textScaleFactor = 1.0,
- int? maxLines,
- Locale? locale,
- StrutStyle? strutStyle,
- TextWidthBasis textWidthBasis = TextWidthBasis.parent,
- TextHeightBehavior? textHeightBehavior,
- double padding = 2,
- double margin = 0,
- bool isSelectableText = false,
- AnySyntaxHighlighterTheme theme = const AnySyntaxHighlighterTheme(),
- double? fontSize,
- String? useGoogleFont,
- Set<
String> reservedWordSets = const {'java', 'python', 'c', 'cpp', 'c#', 'dart', 'go', 'javascript', 'r', 'swift', 'bash', 'ruby'}, - bool lineNumbers = false,
- bool hasCopyButton = false,
- Icon copyIcon = const Icon(Icons.copy_rounded, color: Colors.white),
- 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);