flex()
Enables flex-grow on the element, allowing it to take up as much space as possible (or flex-shrink to allow it to shrink).
flex(grow?: number, shrink?: number): this;
Notes
- This method sets the flexGrow and flexShrink factors of the element.
- If a flex-shrink factor is provided, the flex-grow factor must also be defined.
- In the web-handler implementation, flex-basis is set automatically: when grow is greater than 0, the element’s flex-basis is set to 0 for equal spacing among flex siblings; otherwise, it’s set to auto.
Parameters
- grow — The flex-grow factor; defaults to 1.
- shrink — The flex-shrink factor; defaults to 1.
Return value
The builder instance for chaining.
Related
class ElementBuilder abstractstatic
An abstract base class for UI element builders.
