canMerge static method
- BorderSide a,
- BorderSide b
Whether the two given BorderSides can be merged using BorderSide.merge.
Two sides can be merged if one or both are zero-width with BorderStyle.none, or if they both have the same color and style.
Implementation
static bool canMerge(BorderSide a, BorderSide b) {
if ((a.style == BorderStyle.none && a.width == 0.0) ||
(b.style == BorderStyle.none && b.width == 0.0)) {
return true;
}
return a.style == b.style
&& a.color == b.color;
}