pub struct AbsorbPointer {
pub key: Option<KeyRef>,
pub absorbing: bool,
pub child: Option<WidgetRef>,
}Expand description
A widget that absorbs pointers during hit testing.
When absorbing is true, this widget prevents its subtree from
receiving pointer events by terminating hit testing at itself. It still consumes space
during layout and paints its child as usual. It just prevents its children
from being the target of located events, because it returns true from
RenderBox::hit_test.
See also:
IgnorePointer, which also prevents its children from receiving pointer events but is itself invisible to hit testing.
Flutter’s deprecated ignoringSemantics waits on accessibility.
Fields§
§key: Option<KeyRef>§absorbing: boolWhether this widget absorbs pointers during hit testing.
Regardless of whether this render object absorbs pointers during hit testing, it will still consume space during layout and be visible during painting.
Defaults to true.
child: Option<WidgetRef>Implementations§
Source§impl AbsorbPointer
impl AbsorbPointer
Sourcepub fn new() -> AbsorbPointer
pub fn new() -> AbsorbPointer
Creates a widget that absorbs pointers during hit testing; Dart’s named arguments are the setters.
Sourcepub fn key(self, key: KeyRef) -> AbsorbPointer
pub fn key(self, key: KeyRef) -> AbsorbPointer
Dart AbsorbPointer(key:).
Sourcepub fn absorbing(self, absorbing: bool) -> AbsorbPointer
pub fn absorbing(self, absorbing: bool) -> AbsorbPointer
Dart AbsorbPointer(absorbing:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> AbsorbPointer
pub fn child<K>(self, child: impl IntoWidget<K>) -> AbsorbPointer
Dart AbsorbPointer(child:).
Trait Implementations§
Source§impl Debug for AbsorbPointer
impl Debug for AbsorbPointer
Source§impl Default for AbsorbPointer
impl Default for AbsorbPointer
Source§fn default() -> AbsorbPointer
fn default() -> AbsorbPointer
Source§impl RenderObjectWidget for AbsorbPointer
impl RenderObjectWidget for AbsorbPointer
Source§type RenderObject = RenderAbsorbPointer
type RenderObject = RenderAbsorbPointer
covariant RenderObject parameter type.Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn create_render_object(
&self,
app: &mut App,
_context: BuildContext,
) -> AnyRenderObject
fn create_render_object( &self, app: &mut App, _context: BuildContext, ) -> AnyRenderObject
RenderObject class that this widget represents, using the
configuration described by this widget. Read moreSource§fn update_render_object(
&self,
app: &mut App,
_context: BuildContext,
render_object: RenderHandle<RenderAbsorbPointer>,
)
fn update_render_object( &self, app: &mut App, _context: BuildContext, render_object: RenderHandle<RenderAbsorbPointer>, )
create_render_object. Read moreSource§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
toStringShort, for a widget that names itself apart from its type, as
SizedBox.expand does; see Widget::to_string_short.Source§fn debug_visit_onstage_children(
&self,
app: &App,
children: &[AnyElement],
visitor: &mut dyn FnMut(AnyElement),
)
fn debug_visit_onstage_children( &self, app: &App, children: &[AnyElement], visitor: &mut dyn FnMut(AnyElement), )
debugVisitOnstageChildren of the element this widget makes, for a widget whose
Dart element subclass overrides it only to hide children (_OffstageElement,
_IndexedStackElement): calls visitor for each of children, in order, that is
onstage. Waft’s generic single- and multi-child elements stand in for those subclasses
and ask their widget here; an element of a widget’s own overrides
Element::debug_visit_onstage_children instead.Source§fn did_unmount_render_object(
&self,
app: &mut App,
render_object: RenderHandle<Self::RenderObject>,
)
fn did_unmount_render_object( &self, app: &mut App, render_object: RenderHandle<Self::RenderObject>, )
RenderObject will be of the same type as returned by this object’s
create_render_object.Auto Trait Implementations§
impl !RefUnwindSafe for AbsorbPointer
impl !Send for AbsorbPointer
impl !Sync for AbsorbPointer
impl !UnwindSafe for AbsorbPointer
impl Forget for AbsorbPointer
impl Freeze for AbsorbPointer
impl Move for AbsorbPointer
impl Unpin for AbsorbPointer
impl UnsafeUnpin for AbsorbPointerwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<SingleChildRenderObjectKind> for Wwhere
W: SingleChildRenderObjectWidget,
<W as RenderObjectWidget>::RenderObject: RenderObjectWithChildMixin,
impl<W> IntoWidget<SingleChildRenderObjectKind> for Wwhere
W: SingleChildRenderObjectWidget,
<W as RenderObjectWidget>::RenderObject: RenderObjectWithChildMixin,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.