ReadMoreLess class
Constructors
ReadMoreLess ({Key ? key , required String text , String ? readLessText , String ? readMoreText , Duration animationDuration = const Duration(milliseconds: 200) , double collapsedHeight = 70 , int maxLines = 4 , TextStyle ? textStyle , TextAlign textAlign = TextAlign.center , Widget ? iconCollapsed , Widget ? iconExpanded , Widget customButtonBuilder (bool isCollapsed , VoidCallback onPressed )?, Color iconColor = Colors.black , TextStyle ? buttonTextStyle })
const
Properties
animationDuration
→ Duration
The duration of the animation when transitioning between read more and read less.
final
buttonTextStyle
→ TextStyle ?
The textstyle used for the read more/less button
final
collapsedHeight
→ double
The height of the text in the collapsed state.
final
customButtonBuilder
→ (Widget Function(bool isCollapsed , VoidCallback onPressed ) ?)
Allows for a function that builds a custom clickable widget. isCollapsed
is provided to detimine in what state
the widget has to be built. onPressed
is provided to allow for the widget to be clickable and to trigger the collapsed state.
final
hashCode
→ int
The hash code for this object.
no setter inherited
iconCollapsed
→ Widget ?
Allows a widget to replace the icon in the read more/less button in the collapsed state.
final
iconColor
→ Color
The color of the icon in the read more/less button. Does not work when iconCollapsed or iconExpanded are specified.
final
iconExpanded
→ Widget ?
Allows a widget to replace the icon in the read more/less button in the expanded state.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
maxLines
→ int
The maximum number of lines of the text in the collapsed state.
final
readLessText
→ String ?
The text on the button when the text is expanded, in case the text overflows
final
readMoreText
→ String ?
The text on the button when the text is collapsed, in case the text overflows
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
text
→ String
The main text to be displayed.
final
textAlign
→ TextAlign
Whether and how to align text horizontally.
final
textStyle
→ TextStyle ?
The main textstyle used for text
final