pub struct SingleChildViewport {
pub axis_direction: AxisDirection,
pub offset: ViewportOffsetRef,
pub clip_behavior: Clip,
pub child: Option<WidgetRef>,
}Expand description
Dart’s _SingleChildViewport: the box viewport a SingleChildScrollView scrolls.
Fields§
§axis_direction: AxisDirectionThe direction in which the offset’s pixels increase.
offset: ViewportOffsetRefWhich part of the content inside the viewport should be visible.
clip_behavior: ClipThe content will be clipped (or not) according to this option.
child: Option<WidgetRef>The widget that scrolls.
Implementations§
Source§impl SingleChildViewport
impl SingleChildViewport
Sourcepub fn new(
offset: ViewportOffsetRef,
clip_behavior: Clip,
) -> SingleChildViewport
pub fn new( offset: ViewportOffsetRef, clip_behavior: Clip, ) -> SingleChildViewport
Creates a viewport for a single box child.
Sourcepub fn axis_direction(
self,
axis_direction: AxisDirection,
) -> SingleChildViewport
pub fn axis_direction( self, axis_direction: AxisDirection, ) -> SingleChildViewport
Dart _SingleChildViewport(axisDirection:).
Sourcepub fn child<K>(self, child: impl IntoWidget<K>) -> SingleChildViewport
pub fn child<K>(self, child: impl IntoWidget<K>) -> SingleChildViewport
Dart _SingleChildViewport(child:).
Trait Implementations§
Source§impl Debug for SingleChildViewport
impl Debug for SingleChildViewport
Source§impl RenderObjectWidget for SingleChildViewport
impl RenderObjectWidget for SingleChildViewport
Source§type RenderObject = RenderSingleChildViewport
type RenderObject = RenderSingleChildViewport
The render object this widget creates; Dart’s
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
Creates an instance of the
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<RenderSingleChildViewport>,
)
fn update_render_object( &self, app: &mut App, _context: BuildContext, render_object: RenderHandle<RenderSingleChildViewport>, )
Copies the configuration described by this widget to the given render object, which
will be of the same type as returned by this object’s
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, )
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 to_string_short(&self) -> String
fn to_string_short(&self) -> String
Dart’s
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), )
Dart’s
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>, )
A render object previously associated with this widget has been removed from the tree.
The given
RenderObject will be of the same type as returned by this object’s
create_render_object.Auto Trait Implementations§
impl !RefUnwindSafe for SingleChildViewport
impl !Send for SingleChildViewport
impl !Sync for SingleChildViewport
impl !UnwindSafe for SingleChildViewport
impl Forget for SingleChildViewport
impl Freeze for SingleChildViewport
impl Move for SingleChildViewport
impl Unpin for SingleChildViewport
impl UnsafeUnpin for SingleChildViewportwhere
NonZeroU32Inner: UnsafeUnpin,
&'static ViewportOffsetVTable: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: 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<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>
The widget as a tree node, made where this is called: its
creation_location.