ExpandableText constructor
const
ExpandableText({
- Key? key,
- required Text textWidget,
- Function? onPressed,
- EdgeInsets padding = const EdgeInsets.all(4.0),
- Color backgroundColor = Colors.white,
- Duration animationDuration = const Duration(milliseconds: 500),
- DecorationImage? backgroundImage,
- bool initiallyExpanded = false,
- void onHover()?,
- Widget? arrowWidget = const Icon(Icons.keyboard_arrow_down_rounded, color: Colors.black, size: 25.0),
- ArrowLocation? arrowLocation = ArrowLocation.right,
- ArrowLocation? finalArrowLocation = ArrowLocation.right,
- List<
String> helperTextList = const ['...Show More', '...Show Less'], - TextStyle? helperTextStyle,
- BorderRadius? borderRadius,
- Helper helper = Helper.arrow,
- List<
BoxShadow> ? boxShadow,
• Expandable text widget for general use.
• textWidget
, helper
, initiallyExpanded
, padding
, backgroundColor
, helperTextList
& animationDuration
arguments must not be null.
Implementation
const ExpandableText({
Key? key,
required this.textWidget,
this.onPressed,
this.padding = const EdgeInsets.all(4.0),
this.backgroundColor = Colors.white,
this.animationDuration = const Duration(milliseconds: 500),
this.backgroundImage,
this.initiallyExpanded = false,
this.onHover,
this.arrowWidget = const Icon(Icons.keyboard_arrow_down_rounded, color: Colors.black, size: 25.0),
this.arrowLocation = ArrowLocation.right,
this.finalArrowLocation = ArrowLocation.right,
this.helperTextList = const ['...Show More', '...Show Less'],
this.helperTextStyle,
this.borderRadius,
this.helper = Helper.arrow,
this.boxShadow,
}) : assert(helperTextList.length == 2, 'helperTextList must have exactly 2 elements.'),
super(key: key);