Skip to main content

IconButtonWith

Function IconButtonWith 

Source
pub fn IconButtonWith<F>(
    __arg0: Modifier,
    content_description: impl Into<String>,
    __arg2: IconButtonSpec,
    __arg3: Option<MutableInteractionSource>,
    on_click: impl Fn() + 'static,
    __arg5: F,
) -> NodeId
where F: FnMut() + 'static,
Expand description

An icon button with an enabled state, colours, a touch target, and an interaction source the caller can observe.

Passing an interaction source is how a button’s visual reacts to being held without the caller writing pointer handling: read MutableInteractionSource::collectIsPressedAsState in the content.