RowItem.tap constructor

RowItem.tap(
  1. String title,
  2. String description, {
  3. Key? key,
  4. TextStyle? titleStyle,
  5. TextStyle? descriptionStyle,
  6. TextOverflow? textOverflow,
  7. int? maxLines,
  8. VoidCallback? onTap,
})

Builds a 'text-to-text' widget. It allows the associated value, in this case a Text widget, to be clickable by the user.

Implementation

factory RowItem.tap(
  String title,
  String description, {
  Key? key,
  TextStyle? titleStyle,
  TextStyle? descriptionStyle,
  TextOverflow? textOverflow,
  int? maxLines,
  VoidCallback? onTap,
}) {
  return RowItem(
    key: key,
    title: _Text(
      title,
      style: titleStyle,
      textAlign: TextAlign.start,
      textOverflow: textOverflow,
      maxLines: maxLines,
    ),
    description: InkWell(
      onTap: onTap,
      child: _Text(
        description,
        style: descriptionStyle,
        textAlign: TextAlign.end,
        textOverflow: textOverflow,
        maxLines: maxLines,
        clickable: onTap != null,
        useDefaultDescriptionColor: true,
      ),
    ),
  );
}