buildCurrent property

Widget buildCurrent

Implementation

Widget get buildCurrent {
  Widget current = child;
  Border? border = borderType.value(borderSide);
  Decoration? decoration;
  if (border != null ||
      fillColor != null ||
      boxShadow != null ||
      borderRadius != null ||
      gradient != null) {
    decoration = BoxDecoration(
        border: border,
        color: fillColor,
        borderRadius:
            borderType == BorderType.underline ? null : borderRadius,
        gradient: gradient,
        boxShadow: boxShadow);
  }
  final List<Widget> children = [current.expandedNull];
  if (prefix != null) children.insert(0, prefix!);
  if (suffix != null) children.add(suffix!);
  current = Universal(
      decoration: decoration,
      constraints: constraints,
      borderRadius: borderRadius,
      isClipRRect: borderRadius != null,
      margin: margin,
      padding: padding,
      direction: Axis.horizontal,
      child: children.length > 1 ? null : current,
      children: children.length > 1 ? children : null);
  return current;
}