pub struct BlockSemantics {
pub key: Option<KeyRef>,
pub blocking: bool,
pub child: Option<WidgetRef>,
}Expand description
A widget that drops the semantics of all widget that were painted before it in the same semantic container.
This is useful to hide widgets from accessibility tools that are painted
behind a certain widget, e.g. an alert should usually disallow interaction
with any widget located “behind” the alert (even when they are still
partially visible). Similarly, an open Drawer blocks interactions with
any widget outside the drawer.
See also:
ExcludeSemanticswhich drops all semantics of its descendants.
Fields§
§key: Option<KeyRef>§blocking: boolWhether this widget is blocking semantics of all widget that were painted before it in the same semantic container.
child: Option<WidgetRef>Implementations§
Source§impl BlockSemantics
impl BlockSemantics
Sourcepub fn new() -> BlockSemantics
pub fn new() -> BlockSemantics
Creates a widget that excludes the semantics of all widgets painted before it in the same semantic container; Dart’s named arguments are the setters.
Sourcepub fn key(self, key: KeyRef) -> BlockSemantics
pub fn key(self, key: KeyRef) -> BlockSemantics
Dart BlockSemantics(key:).
Sourcepub fn blocking(self, blocking: bool) -> BlockSemantics
pub fn blocking(self, blocking: bool) -> BlockSemantics
Dart BlockSemantics(blocking:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> BlockSemantics
pub fn child<K>(self, child: impl IntoWidget<K>) -> BlockSemantics
Dart BlockSemantics(child:).
Trait Implementations§
Source§impl Debug for BlockSemantics
impl Debug for BlockSemantics
Source§impl Default for BlockSemantics
impl Default for BlockSemantics
Source§fn default() -> BlockSemantics
fn default() -> BlockSemantics
Source§impl RenderObjectWidget for BlockSemantics
impl RenderObjectWidget for BlockSemantics
Source§type RenderObject = RenderBlockSemantics
type RenderObject = RenderBlockSemantics
covariant RenderObject parameter type.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<RenderBlockSemantics>,
)
fn update_render_object( &self, app: &mut App, _context: BuildContext, render_object: RenderHandle<RenderBlockSemantics>, )
create_render_object. Read moreSource§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 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 BlockSemantics
impl !Send for BlockSemantics
impl !Sync for BlockSemantics
impl !UnwindSafe for BlockSemantics
impl Forget for BlockSemantics
impl Freeze for BlockSemantics
impl Move for BlockSemantics
impl Unpin for BlockSemantics
impl UnsafeUnpin for BlockSemanticswhere
*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.