pub struct ScrollConfiguration {
pub key: Option<KeyRef>,
pub behavior: ScrollBehaviorRef,
pub child: WidgetRef,
}Expand description
Controls how Scrollable widgets behave in a subtree.
The scroll configuration determines the ScrollPhysics and viewport
decorations used by descendants of child.
Fields§
§key: Option<KeyRef>§behavior: ScrollBehaviorRefHow Scrollable widgets that are descendants of child should behave.
child: WidgetRefThe widget below this widget in the tree.
Implementations§
Source§impl ScrollConfiguration
impl ScrollConfiguration
Sourcepub fn new<K>(
behavior: ScrollBehaviorRef,
child: impl IntoWidget<K>,
) -> ScrollConfiguration
pub fn new<K>( behavior: ScrollBehaviorRef, child: impl IntoWidget<K>, ) -> ScrollConfiguration
Creates a widget that controls how Scrollable widgets behave in a subtree.
Sourcepub fn key(self, key: KeyRef) -> ScrollConfiguration
pub fn key(self, key: KeyRef) -> ScrollConfiguration
Dart ScrollConfiguration(key:).
Sourcepub fn of(app: &mut App, context: BuildContext) -> ScrollBehaviorRef
pub fn of(app: &mut App, context: BuildContext) -> ScrollBehaviorRef
The ScrollBehavior for Scrollable widgets in the given BuildContext.
If no ScrollConfiguration widget is in scope of the given context,
a default PlainScrollBehavior is returned.
Trait Implementations§
Source§impl Debug for ScrollConfiguration
impl Debug for ScrollConfiguration
Source§impl InheritedWidget for ScrollConfiguration
impl InheritedWidget for ScrollConfiguration
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
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 update_should_notify(&self, old_widget: &ScrollConfiguration) -> bool
fn update_should_notify(&self, old_widget: &ScrollConfiguration) -> bool
Whether the framework should notify widgets that inherit from this widget. Read more
Source§fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
fn as_inherited_theme(&self) -> Option<&dyn InheritedTheme>
Dart’s
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 ScrollConfiguration
impl !Send for ScrollConfiguration
impl !Sync for ScrollConfiguration
impl !UnwindSafe for ScrollConfiguration
impl Forget for ScrollConfiguration
impl Freeze for ScrollConfigurationwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn ScrollBehavior> is !null: Freeze,
PhantomData<RcInner<dyn ScrollBehavior>>: Freeze,
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
impl Move for ScrollConfiguration
impl Unpin for ScrollConfiguration
impl UnsafeUnpin for ScrollConfigurationwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn ScrollBehavior> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ScrollBehavior>>: 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
Mutably borrows from an owned value. Read more
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>
The widget as a tree node, made where this is called: its
creation_location.