transformNodeToIconButton function

void transformNodeToIconButton(
  1. ButtonNode node
)

Implementation

void transformNodeToIconButton(ButtonNode node) {
  node.update(
    middleBoxLocal: node.basicBoxLocal.copyWith(
      width: 48,
      height: 48,
    ),
    padding: EdgeInsetsModel.zero,
  );
  node.properties.icon = node.properties.icon.copyWith(size: 20);
  node.aspectRatioLock = true;
  if (node.properties.label.isEmpty) node.properties.label = 'button';
}