ParsedReadMore class

Inheritance

Constructors

ParsedReadMore(TextHighlightParser parser, {Key? key, Color? colorClickableText, TextStyle? style, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, double? textScaleFactor, String? semanticsLabel, void callbackOnStateChange(ReadMoreState oldState, ReadMoreState newstate)?, String? suffixText, TextStyle? readLessTextStyle, TextStyle? readMoreTextStyle, TextStyle? readMoreDelimiterStyle, TextStyle? readLessDelimiterStyle, TextStyle? suffixTextStyle, void onTapReadMoreText()?, void onTapReadLessText()?, bool enableStateChange = true, bool shouldShowSuffixText = true, String readMoreText = ' read more', String readLessText = ' show less', bool shouldShowReadLessText = true, bool shouldShowReadMoreText = true, String readMoreDelimiter = _kEllipsis, String readLessDelimiter = ' '})
const

Properties

callbackOnStateChange → void Function(ReadMoreState oldState, ReadMoreState newstate)?
Called when state change between ReadMoreState.expanded and ReadMoreState.collapsed
final
colorClickableText Color?
Color for readMoreText and readLessText. If specified style is provided for readMoreText and readLessText, then that is used else this color is used as fallback.
final
enableStateChange bool
If it is null, then fallback to internal _onTapExpandCollapseText function. Expand and collapse functionality happens because _onTapExpandCollapseText invokes setState. To disable the functionality of _onTapExpandCollapseText, it can be set to false.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
final
onTapReadLessText → void Function()?
It is called when tap on readLessText, if it is null, then fallback to internal _onTapExpandCollapseText function.
final
onTapReadMoreText → void Function()?
It is called when tap on readMoreText, if it is null, then fallback to internal _onTapExpandCollapseText function.
final
parser TextHighlightParser
final
readLessDelimiter String
Text is displayed between the text and readLessTextStyle
final
readLessDelimiterStyle TextStyle?
TextStyle for readLessDelimiter
final
readLessText String
Text is displayed when the state is ReadMoreState.expanded
final
readLessTextStyle TextStyle?
TextStyle for readLessText
final
readMoreDelimiter String
Text is displayed between the trimmed text and readMoreTextStyle
final
readMoreDelimiterStyle TextStyle?
TextStyle for readMoreDelimiter
final
readMoreText String
Text is displayed when the state is ReadMoreState.collapsed
final
readMoreTextStyle TextStyle?
TextStyle for readMoreText
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
final
shouldShowReadLessText bool
Either readLessText should be displayed.
final
shouldShowReadMoreText bool
Either readMoreText should be displayed.
final
shouldShowSuffixText bool
Either suffixText should be displayed.
final
style TextStyle?
TextStyle for text that is not highlighted. If not provided, it defaults to style. If style is provided and other styles are not provided, style is used as fallback.
final
suffixText String?
Text is displayed if passed irrespective of state and it is appended at the end of the Text widget.
final
suffixTextStyle TextStyle?
TextStyle for suffixText
final
textAlign TextAlign?
final
textDirection TextDirection?
final
textScaleFactor double?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() ParsedReadMoreState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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