pub struct FocusTraversalOrder {
pub key: Option<KeyRef>,
pub order: FocusOrderRef,
pub child: WidgetRef,
}Expand description
An inherited widget that describes the order in which its child subtree should be traversed.
The order for a widget is determined by the FocusOrder returned by
FocusTraversalOrder::of for a particular context.
Fields§
§key: Option<KeyRef>See Widget::key.
order: FocusOrderRefThe order for the widget descendants of this FocusTraversalOrder.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl FocusTraversalOrder
impl FocusTraversalOrder
Sourcepub fn new<K>(
order: FocusOrderRef,
child: impl IntoWidget<K>,
) -> FocusTraversalOrder
pub fn new<K>( order: FocusOrderRef, child: impl IntoWidget<K>, ) -> FocusTraversalOrder
Creates an inherited widget used to describe the focus order of the child subtree.
Sourcepub fn key(self, key: KeyRef) -> FocusTraversalOrder
pub fn key(self, key: KeyRef) -> FocusTraversalOrder
Dart FocusTraversalOrder(key:).
Sourcepub fn of(app: &App, context: BuildContext) -> FocusOrderRef
pub fn of(app: &App, context: BuildContext) -> FocusOrderRef
Finds the FocusOrder in the nearest ancestor FocusTraversalOrder widget.
It does not create a rebuild dependency because changing the traversal order doesn’t change the widget tree, so nothing needs to be rebuilt as a result of an order change.
If no FocusTraversalOrder ancestor exists, this panics.
Sourcepub fn maybe_of(app: &App, context: BuildContext) -> Option<FocusOrderRef>
pub fn maybe_of(app: &App, context: BuildContext) -> Option<FocusOrderRef>
Finds the FocusOrder in the nearest ancestor FocusTraversalOrder widget.
It does not create a rebuild dependency because changing the traversal order doesn’t change the widget tree, so nothing needs to be rebuilt as a result of an order change.
If no FocusTraversalOrder ancestor exists, returns None.
Trait Implementations§
Source§impl Debug for FocusTraversalOrder
impl Debug for FocusTraversalOrder
Source§impl InheritedWidget for FocusTraversalOrder
impl InheritedWidget for FocusTraversalOrder
Source§fn update_should_notify(&self, _old_widget: &FocusTraversalOrder) -> bool
fn update_should_notify(&self, _old_widget: &FocusTraversalOrder) -> bool
Since the order of traversal doesn’t affect display of anything, we don’t need to force a rebuild of anything that depends upon it.
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 as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
this is InheritedTheme: an inherited widget that is an InheritedTheme
answers with itself, which is what InheritedTheme::capture collects.Auto Trait Implementations§
impl !RefUnwindSafe for FocusTraversalOrder
impl !Send for FocusTraversalOrder
impl !Sync for FocusTraversalOrder
impl !UnwindSafe for FocusTraversalOrder
impl Forget for FocusTraversalOrder
impl Freeze for FocusTraversalOrderwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn FocusOrder> is !null: Freeze,
PhantomData<RcInner<dyn FocusOrder>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for FocusTraversalOrder
impl Unpin for FocusTraversalOrder
impl UnsafeUnpin for FocusTraversalOrderwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn FocusOrder> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn FocusOrder>>: 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<InheritedKind> for Wwhere
W: InheritedWidget,
impl<W> IntoWidget<InheritedKind> for Wwhere
W: InheritedWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.