isUniform property

bool isUniform

Whether all the sides of the border (outside and inside) are identical. Uniform borders are typically more efficient to paint.

Implementation

bool get isUniform {
  assert(top != null);
  assert(right != null);
  assert(bottom != null);
  assert(left != null);
  assert(horizontalInside != null);
  assert(verticalInside != null);

  final Color topColor = top.color;
  if (right.color != topColor ||
      bottom.color != topColor ||
      left.color != topColor ||
      horizontalInside.color != topColor ||
      verticalInside.color != topColor)
    return false;

  final double topWidth = top.width;
  if (right.width != topWidth ||
      bottom.width != topWidth ||
      left.width != topWidth ||
      horizontalInside.width != topWidth ||
      verticalInside.width != topWidth)
    return false;

  final BorderStyle topStyle = top.style;
  if (right.style != topStyle ||
      bottom.style != topStyle ||
      left.style != topStyle ||
      horizontalInside.style != topStyle ||
      verticalInside.style != topStyle)
    return false;

  return true;
}