isUniform property
override
Whether all four sides of the border are identical. Uniform borders are typically more efficient to paint.
A uniform border by definition has no text direction dependency and therefore could be expressed as a Border, even if it is currently a BorderDirectional. A uniform border can also be expressed as a RoundedRectangleBorder.
Implementation
@override
bool get isUniform {
final Color topColor = top.color;
if (right.color != topColor ||
bottom.color != topColor ||
left.color != topColor)
return false;
final double topWidth = top.width;
if (right.width != topWidth ||
bottom.width != topWidth ||
left.width != topWidth)
return false;
final BorderStyle topStyle = top.style;
if (right.style != topStyle ||
bottom.style != topStyle ||
left.style != topStyle)
return false;
return true;
}