build method
Implementation
String build() {
if (<String>{
topLeft.build(),
topRight.build(),
bottomLeft.build(),
bottomRight.build(),
}.length ==
1) {
return topLeft.build();
} else if (topLeft.build() == bottomRight.build() &&
topRight.build() == bottomLeft.build()) {
return [topLeft.build(), topRight.build()].join(' ');
} else if (bottomRight.build() == bottomLeft.build() &&
topLeft.build() != topRight.build()) {
return [topLeft.build(), topRight.build(), bottomRight.build()].join(' ');
}
return [
topLeft.build(),
topRight.build(),
bottomRight.build(),
bottomLeft.build(),
].join(' ');
}