buildCell method

Widget buildCell(
  1. FdcRowActionContext context
)

Builds this action column's cell content.

Implementation

Widget buildCell(FdcRowActionContext context) {
  final visibleActions = [
    for (final action in actions)
      if (action.isVisible(context)) action,
  ];
  if (visibleActions.isEmpty) {
    return const SizedBox.shrink();
  }

  return Padding(
    padding: padding,
    child: FittedBox(
      fit: BoxFit.scaleDown,
      child: Row(
        mainAxisSize: MainAxisSize.min,
        children: [
          for (var i = 0; i < visibleActions.length; i++) ...[
            _ActionButton(
              action: visibleActions[i],
              context: context,
              iconSize: iconSize,
            ),
            if (spacing > 0 && i < visibleActions.length - 1)
              SizedBox(width: spacing),
          ],
        ],
      ),
    ),
  );
}