border method
Implementation
Border? border(String style) {
final split = style.split("-");
final prevColorOrDefault =
boxDecoration.border?.bottom.color ?? Colors.black;
if (split.length == 1) {
if (split[0] == "border") {
return Border.all(
width: 1,
color: prevColorOrDefault,
);
}
} else if (split.length == 2) {
try {
final double borderSize = double.tryParse(split[1]) ?? 0;
return Border.all(
width: borderSize,
color: prevColorOrDefault,
);
} on RangeError catch (_) {}
}
return null;
}