pub struct FlexColumnWidth {
pub value: f64,
}Expand description
Sizes the column by taking a part of the remaining space once all the other columns have been laid out.
For example, if two columns have a FlexColumnWidth, then half the space will go to one
and half the space will go to the other.
This is a cheap way to size a column.
Fields§
§value: f64The fraction of the remaining space once all the other columns have been laid out that this column should occupy.
Implementations§
Source§impl FlexColumnWidth
impl FlexColumnWidth
Sourcepub const fn new(value: f64) -> FlexColumnWidth
pub const fn new(value: f64) -> FlexColumnWidth
Creates a column width based on a fraction of the remaining space once all the other
columns have been laid out. Dart’s default value is 1.0.
Sourcepub fn default_width() -> TableColumnWidthRef
pub fn default_width() -> TableColumnWidthRef
Dart’s const FlexColumnWidth(), the default column width of a table: one shared value,
as Dart’s constant is one object, so a table given the default again is unchanged.
Trait Implementations§
Source§impl Debug for FlexColumnWidth
impl Debug for FlexColumnWidth
Source§impl TableColumnWidth for FlexColumnWidth
impl TableColumnWidth for FlexColumnWidth
Source§fn min_intrinsic_width(
&self,
_app: &mut App,
_cells: &[AnyRenderBox],
_container_width: f64,
) -> f64
fn min_intrinsic_width( &self, _app: &mut App, _cells: &[AnyRenderBox], _container_width: f64, ) -> f64
The smallest width that the column can have. Read more
Source§fn max_intrinsic_width(
&self,
_app: &mut App,
_cells: &[AnyRenderBox],
_container_width: f64,
) -> f64
fn max_intrinsic_width( &self, _app: &mut App, _cells: &[AnyRenderBox], _container_width: f64, ) -> f64
The ideal width that the column should have. This must be equal to or greater than the
min_intrinsic_width. The column might be bigger than this
width, e.g. if the column is flexible or if the table’s width ends up being forced to be
bigger than the sum of all the max_intrinsic_width values. Read moreSource§fn flex(&self, _app: &mut App, _cells: &[AnyRenderBox]) -> Option<f64>
fn flex(&self, _app: &mut App, _cells: &[AnyRenderBox]) -> Option<f64>
The flex factor to apply to the cell if there is any room left over when laying out the
table. The remaining space is distributed to any columns with flex in proportion to
their flex value (higher values get more space). Read more
Auto Trait Implementations§
impl Freeze for FlexColumnWidth
impl RefUnwindSafe for FlexColumnWidth
impl Send for FlexColumnWidth
impl Sync for FlexColumnWidth
impl Unpin for FlexColumnWidth
impl UnsafeUnpin for FlexColumnWidth
impl UnwindSafe for FlexColumnWidth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more