render method

  1. @override
Widget render(
  1. BuildContext context,
  2. AntdIconStyle style
)
override

Implementation

@override
Widget render(BuildContext context, AntdIconStyle style) {
  var list = [
    if (icon != null)
      Icon(
        icon,
        size: style.size,
        color: style.color,
        fill: style.fill,
        weight: style.weight,
        grade: style.grade,
        opticalSize: style.opticalSize,
        shadows: style.shadows,
        semanticLabel: style.semanticLabel,
        textDirection: style.textDirection,
        applyTextScaling: style.applyTextScaling,
        blendMode: style.blendMode,
      ),
    if (child != null)
      AntdBox(
        style: style.childStyle,
        child: child,
      ),
  ];
  return AntdBox(
    style: style.bodyStyle,
    onTap: onTap,
    child: AntdFlex(
        direction: row ? Axis.horizontal : Axis.vertical,
        style: style.flexStyle,
        children: reversed ? list.reversed.toList() : list),
  );
}