link<T> static method

ReadableColumn<T> link<T>(
  1. String label, {
  2. required String text(
    1. T v
    ),
  3. String href(
    1. T v
    )?,
  4. void onTap(
    1. T v
    )?,
  5. double? width,
  6. int flex = 1,
})

A link affordance over a URL/reference.

Implementation

static ReadableColumn<T> link<T>(
  String label, {
  required String Function(T v) text,
  String Function(T v)? href,
  void Function(T v)? onTap,
  double? width,
  int flex = 1,
}) =>
    ReadableColumn<T>(
      label,
      type: ReadableColumnType.link,
      width: width,
      flex: flex,
      sortKey: (v) => text(v),
      cell: (ctx, v) => ReadableCells.link(text(v), onTap: onTap == null ? null : () => onTap(v)),
    );