border property

  1. @override
EdgeInsets get border
override

Implementation

@override
EdgeInsets get border {
  if (renderBoxModelInLayoutStack.isNotEmpty &&
      _layoutPassBorderCachePassId == renderBoxModelLayoutPassId &&
      _layoutPassBorder != null) {
    return _layoutPassBorder!;
  }

  // If has border, render padding should subtracting the edge of the border
  final EdgeInsets edgeInsets = EdgeInsets.fromLTRB(
    effectiveBorderLeftWidth.computedValue,
    effectiveBorderTopWidth.computedValue,
    effectiveBorderRightWidth.computedValue,
    effectiveBorderBottomWidth.computedValue,
  );
  if (renderBoxModelInLayoutStack.isNotEmpty) {
    _layoutPassBorderCachePassId = renderBoxModelLayoutPassId;
    _layoutPassBorder = edgeInsets;
  }
  return edgeInsets;
}