setWidth static method
Implementation
static StyleBase setWidth(StyleBase style, Dimension? width) {
StyleBase rst = style.copyWith();
if (style is Style) {
(rst as Style).width = width;
}
if (style is ScopedStyles) {
(rst as ScopedStyles).styles.forEach((key, value) {
value.width = width;
});
}
return rst;
}