pub trait ModifierExt {
Show 29 methods
// Required methods
fn window_insets_padding(self, insets: WindowInsets) -> Modifier;
fn consume_window_insets(self, insets: WindowInsets) -> Modifier;
fn window_insets_left_width(self, insets: WindowInsets) -> Modifier;
fn window_insets_top_height(self, insets: WindowInsets) -> Modifier;
fn window_insets_right_width(self, insets: WindowInsets) -> Modifier;
fn window_insets_bottom_height(self, insets: WindowInsets) -> Modifier;
fn padding(self, padding: Padding) -> Modifier;
fn padding_all(self, padding: Dp) -> Modifier;
fn padding_symmetric(self, horizontal: Dp, vertical: Dp) -> Modifier;
fn offset(self, x: Dp, y: Dp) -> Modifier;
fn size(self, width: Dp, height: Dp) -> Modifier;
fn required_size(self, width: Dp, height: Dp) -> Modifier;
fn required_width(self, width: Dp) -> Modifier;
fn required_height(self, height: Dp) -> Modifier;
fn default_min_size(self, min_width: Dp, min_height: Dp) -> Modifier;
fn width(self, width: Dp) -> Modifier;
fn height(self, height: Dp) -> Modifier;
fn size_in(
self,
min_width: Option<Dp>,
max_width: Option<Dp>,
min_height: Option<Dp>,
max_height: Option<Dp>,
) -> Modifier;
fn constrain(
self,
width: Option<AxisConstraint>,
height: Option<AxisConstraint>,
) -> Modifier;
fn fill_max_width(self) -> Modifier;
fn fill_max_height(self) -> Modifier;
fn fill_max_size(self) -> Modifier;
fn minimum_interactive_component_size(self) -> Modifier;
fn weight(self, weight: f32) -> Modifier;
fn align(self, alignment: Alignment) -> Modifier;
fn draggable<C>(self, on_drag_delta: C) -> Modifier
where C: Into<CallbackWith<DragDelta, ()>>;
fn draggable_with(self, args: DraggableArgs) -> Modifier;
fn semantics(self, args: SemanticsArgs) -> Modifier;
fn clear_and_set_semantics(self, args: SemanticsArgs) -> Modifier;
}Expand description
Shared modifier extensions that are not tied to a specific design system.
Required Methods§
Sourcefn window_insets_padding(self, insets: WindowInsets) -> Modifier
fn window_insets_padding(self, insets: WindowInsets) -> Modifier
Pads and consumes the space not already occupied by enclosing inset modifiers.
Sourcefn consume_window_insets(self, insets: WindowInsets) -> Modifier
fn consume_window_insets(self, insets: WindowInsets) -> Modifier
Marks inset space as occupied for nested padding and size modifiers.
Sourcefn window_insets_left_width(self, insets: WindowInsets) -> Modifier
fn window_insets_left_width(self, insets: WindowInsets) -> Modifier
Sets width to the remaining left window inset.
Sourcefn window_insets_top_height(self, insets: WindowInsets) -> Modifier
fn window_insets_top_height(self, insets: WindowInsets) -> Modifier
Sets height to the remaining top window inset.
Sourcefn window_insets_right_width(self, insets: WindowInsets) -> Modifier
fn window_insets_right_width(self, insets: WindowInsets) -> Modifier
Sets width to the remaining right window inset.
Sourcefn window_insets_bottom_height(self, insets: WindowInsets) -> Modifier
fn window_insets_bottom_height(self, insets: WindowInsets) -> Modifier
Sets height to the remaining bottom window inset.
Sourcefn padding_all(self, padding: Dp) -> Modifier
fn padding_all(self, padding: Dp) -> Modifier
Adds symmetric padding on all edges.
Sourcefn padding_symmetric(self, horizontal: Dp, vertical: Dp) -> Modifier
fn padding_symmetric(self, horizontal: Dp, vertical: Dp) -> Modifier
Adds symmetric padding for horizontal and vertical edges.
Sourcefn size(self, width: Dp, height: Dp) -> Modifier
fn size(self, width: Dp, height: Dp) -> Modifier
Constrains the content to an exact size when possible.
Sourcefn required_size(self, width: Dp, height: Dp) -> Modifier
fn required_size(self, width: Dp, height: Dp) -> Modifier
Pins the content to an exact size regardless of incoming constraints.
Sourcefn required_width(self, width: Dp) -> Modifier
fn required_width(self, width: Dp) -> Modifier
Pins the content width regardless of incoming constraints.
Sourcefn required_height(self, height: Dp) -> Modifier
fn required_height(self, height: Dp) -> Modifier
Pins the content height regardless of incoming constraints.
Sourcefn default_min_size(self, min_width: Dp, min_height: Dp) -> Modifier
fn default_min_size(self, min_width: Dp, min_height: Dp) -> Modifier
Applies a default minimum size only when the incoming axis leaves the minimum open, so an explicit outer size always wins.
Sourcefn height(self, height: Dp) -> Modifier
fn height(self, height: Dp) -> Modifier
Constrains the content to an exact height when possible.
Sourcefn size_in(
self,
min_width: Option<Dp>,
max_width: Option<Dp>,
min_height: Option<Dp>,
max_height: Option<Dp>,
) -> Modifier
fn size_in( self, min_width: Option<Dp>, max_width: Option<Dp>, min_height: Option<Dp>, max_height: Option<Dp>, ) -> Modifier
Constrains the content size within optional min/max bounds.
Sourcefn constrain(
self,
width: Option<AxisConstraint>,
height: Option<AxisConstraint>,
) -> Modifier
fn constrain( self, width: Option<AxisConstraint>, height: Option<AxisConstraint>, ) -> Modifier
Applies explicit width/height interval constraints.
Sourcefn fill_max_width(self) -> Modifier
fn fill_max_width(self) -> Modifier
Fills the available width within parent bounds.
Sourcefn fill_max_height(self) -> Modifier
fn fill_max_height(self) -> Modifier
Fills the available height within parent bounds.
Sourcefn fill_max_size(self) -> Modifier
fn fill_max_size(self) -> Modifier
Fills the available size within parent bounds.
Sourcefn minimum_interactive_component_size(self) -> Modifier
fn minimum_interactive_component_size(self) -> Modifier
Enforces a minimum interactive size by expanding and centering content.
Sourcefn weight(self, weight: f32) -> Modifier
fn weight(self, weight: f32) -> Modifier
Provides weighted parent data for row and column layouts.
Sourcefn align(self, alignment: Alignment) -> Modifier
fn align(self, alignment: Alignment) -> Modifier
Provides alignment parent data for layered boxed layouts.
Sourcefn draggable_with(self, args: DraggableArgs) -> Modifier
fn draggable_with(self, args: DraggableArgs) -> Modifier
Emits drag deltas with custom drag configuration.
Sourcefn semantics(self, args: SemanticsArgs) -> Modifier
fn semantics(self, args: SemanticsArgs) -> Modifier
Attaches accessibility semantics metadata to this subtree.
Sourcefn clear_and_set_semantics(self, args: SemanticsArgs) -> Modifier
fn clear_and_set_semantics(self, args: SemanticsArgs) -> Modifier
Clears descendant semantics and applies the provided metadata.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".