CreamySyntaxHighlighter class

Highlights a source code's syntax based on language type & theme type.

This highlighter internally uses flutter_highlight & highlight

Implemented types

Constructors

CreamySyntaxHighlighter({required LanguageType language, required HighlightedThemeType theme, HighlightedThemeType? darkTheme, ThemeMode? themeMode})
Creates a syntax highlighter.

Properties

brightness Brightness?
The Theme brightness of the syntax highlight
no setter
darkTheme HighlightedThemeType?
The dark theme used by this highlighter when brightness is Brightness.dark
final
hashCode int
The hash code for this object.
no setterinherited
language LanguageType
Highlight language
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme HighlightedThemeType
Highlight theme
final
themeMode ThemeMode?
The theme used by this syntax highlighter. If brightness is dark, darkTheme is used and when it's light or null, theme is used.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseTextEditingValue(TextEditingValue? value) List<TextSpan>
Parses text from value & generates syntax highlighted text as list of TextSpan.
override
toString() String
A string representation of this object.
inherited
withContext(BuildContext context) → void
Provide the context to this highligher. This method will be used to update the brighness based on context in RichEditableText

Operators

operator ==(Object other) bool
The equality operator.
inherited