NxExpandableText constructor

const NxExpandableText({
  1. required String text,
  2. required String buttonText,
  3. Key? key,
  4. Image? icon,
  5. TextStyle? dialogTextStyle,
  6. TextStyle? textStyle,
  7. TextStyle? buttonTextStyle,
  8. Color? backgroundColor,
  9. int maxLines = 1,
})

Creates an expandable text widget.

  • text - The text to display and expand
  • buttonText - Text for the expand button
  • maxLines - Number of lines to show before truncating
  • icon - Custom close icon for the dialog
  • dialogTextStyle - Text style in the dialog
  • textStyle - Text style for the truncated text
  • buttonTextStyle - Text style for the expand button
  • backgroundColor - Background color of the dialog

Implementation

const NxExpandableText({
  required this.text,
  required this.buttonText,
  super.key,
  this.icon,
  this.dialogTextStyle,
  this.textStyle,
  this.buttonTextStyle,
  this.backgroundColor,
  this.maxLines = 1,
});