copyWith method

StreamChannelListTile copyWith({
  1. Key? key,
  2. Channel? channel,
  3. Widget? leading,
  4. Widget? title,
  5. Widget? subtitle,
  6. VoidCallback? onTap,
  7. VoidCallback? onLongPress,
  8. VisualDensity? visualDensity,
  9. EdgeInsetsGeometry? contentPadding,
  10. bool? selected,
  11. Widget sendingIndicatorBuilder(
    1. BuildContext,
    2. Message
    )?,
  12. Color? tileColor,
  13. Color? selectedTileColor,
  14. WidgetBuilder? unreadIndicatorBuilder,
  15. Widget? trailing,
})

Creates a copy of this tile but with the given fields replaced with the new values.

Implementation

StreamChannelListTile copyWith({
  Key? key,
  Channel? channel,
  Widget? leading,
  Widget? title,
  Widget? subtitle,
  VoidCallback? onTap,
  VoidCallback? onLongPress,
  VisualDensity? visualDensity,
  EdgeInsetsGeometry? contentPadding,
  bool? selected,
  Widget Function(BuildContext, Message)? sendingIndicatorBuilder,
  Color? tileColor,
  Color? selectedTileColor,
  WidgetBuilder? unreadIndicatorBuilder,
  Widget? trailing,
}) {
  return StreamChannelListTile(
    key: key ?? this.key,
    channel: channel ?? this.channel,
    leading: leading ?? this.leading,
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    onTap: onTap ?? this.onTap,
    onLongPress: onLongPress ?? this.onLongPress,
    visualDensity: visualDensity ?? this.visualDensity,
    contentPadding: contentPadding ?? this.contentPadding,
    sendingIndicatorBuilder:
        sendingIndicatorBuilder ?? this.sendingIndicatorBuilder,
    tileColor: tileColor ?? this.tileColor,
    trailing: trailing ?? this.trailing,
    unreadIndicatorBuilder:
        unreadIndicatorBuilder ?? this.unreadIndicatorBuilder,
    selected: selected ?? this.selected,
    selectedTileColor: selectedTileColor ?? this.selectedTileColor,
  );
}