getBorder method

Border? getBorder()

Implementation

Border? getBorder() {
  var topSide = _generateBorderSide(borderTopWidth, borderTopColor);
  var bottomSide = _generateBorderSide(borderBottomWidth, borderBottomColor);
  var leftSide = _generateBorderSide(borderLeftWidth, borderLeftColor);
  var rightSide = _generateBorderSide(borderRightWidth, borderRightColor);
  if (isNoneSide(topSide) &&
      isNoneSide(bottomSide) &&
      isNoneSide(leftSide) &&
      isNoneSide(rightSide)) {
    return null;
  }

  return Border(
    top: _generateBorderSide(borderTopWidth, borderTopColor),
    left: _generateBorderSide(borderLeftWidth, borderLeftColor),
    bottom: _generateBorderSide(borderBottomWidth, borderBottomColor),
    right: _generateBorderSide(borderRightWidth, borderRightColor),
  );
}