Tiago Nunes

    Tiago Nunes

    1 year ago
    Hey everyone, How can I have a clickable Surface with elevation and shape? When I do
    Modifier.clip(shape).clickable {}
    , the Surface loses its elevation
    Filip Wiesner

    Filip Wiesner

    1 year ago
    Surface has shape parameter
    And I think even clickable overload
    Actually that might've been Card
    Tiago Nunes

    Tiago Nunes

    1 year ago
    Surface’s shape parameter doesn’t clip the ripple effect. There is an experimental overload that accepts onClick, but I figured I’d ask first, before using experimental apis
    Filip Wiesner

    Filip Wiesner

    1 year ago
    You can just try making a
    Box
    inside
    Surface
    clickable and
    clip
    that
    Tiago Nunes

    Tiago Nunes

    1 year ago
    Yep, that’ll work, thanks!
    Albert Chang

    Albert Chang

    1 year ago
    It doesn’t clip the ripple because you are setting clickable modifier yourself instead of using the overload with
    onClick
    parameter. Experimental just means the api might change in the future and is safe to use. The doc also says:
    If you want to have a Surface that handles clicks, consider using another overload.