TTableHeader<T, K>.chip constructor
TTableHeader<T, K>.chip (})
Creates a header for displaying chips.
Implementation
TTableHeader.chip(
this.text,
this.map, {
this.flex,
this.minWidth,
this.maxWidth,
this.alignment,
Color Function(T)? color,
TVariant? type,
void Function()? Function(T)? onTap,
}) : builder = ((ctx, item, __) {
final isDense = TTableScope.maybeOf(ctx)?.dense ?? false;
return TChip(
text: map?.call(item.data).toString(),
color: color?.call(item.data),
type: type,
onTap: onTap?.call(item.data),
padding: isDense ? const EdgeInsets.symmetric(horizontal: 6, vertical: 2) : null,
);
});