pub struct SliverVariedExtentList {
pub key: Option<KeyRef>,
pub delegate: SliverChildDelegateRef,
pub item_extent_builder: ItemExtentBuilder,
}Expand description
A sliver that places its box children in a linear array and constrains them to have the
corresponding extent returned by item_extent_builder.
To learn more about slivers, see CustomScrollView::slivers.
SliverVariedExtentList arranges its children in a line along the main axis starting at
offset zero and without gaps. Each child is constrained to the corresponding extent along the
main axis and the SliverConstraints::cross_axis_extent along the cross axis.
SliverVariedExtentList is more efficient than SliverList because it does not need to
lay out its children to obtain their extent along the main axis. It’s a little more flexible
than SliverFixedExtentList because this allows the children to have different extents.
Fields§
§key: Option<KeyRef>§delegate: SliverChildDelegateRefThe delegate that provides the children for this widget.
item_extent_builder: ItemExtentBuilderThe children extent builder.
Should return None if asked to build an item extent with a greater index than exists.
Implementations§
Source§impl SliverVariedExtentList
impl SliverVariedExtentList
Sourcepub fn new(
delegate: SliverChildDelegateRef,
item_extent_builder: ItemExtentBuilder,
) -> SliverVariedExtentList
pub fn new( delegate: SliverChildDelegateRef, item_extent_builder: ItemExtentBuilder, ) -> SliverVariedExtentList
Creates a sliver that places box children with the corresponding main axis extent in a linear array.
Sourcepub fn builder(
item_builder: impl Fn(&mut App, BuildContext, i32) -> Option<WidgetRef> + 'static,
item_extent_builder: ItemExtentBuilder,
) -> SliverVariedExtentListBuilder
pub fn builder( item_builder: impl Fn(&mut App, BuildContext, i32) -> Option<WidgetRef> + 'static, item_extent_builder: ItemExtentBuilder, ) -> SliverVariedExtentListBuilder
A sliver that places multiple box children in a linear array along the main axis, built lazily.
Sourcepub fn list(
children: Vec<WidgetRef>,
item_extent_builder: ItemExtentBuilder,
) -> SliverVariedExtentListList
pub fn list( children: Vec<WidgetRef>, item_extent_builder: ItemExtentBuilder, ) -> SliverVariedExtentListList
A sliver that places multiple box children in a linear array along the main axis, built from an explicit list of widgets.
Sourcepub fn key(self, key: KeyRef) -> SliverVariedExtentList
pub fn key(self, key: KeyRef) -> SliverVariedExtentList
Dart SliverVariedExtentList(key:).
Trait Implementations§
Source§impl Debug for SliverVariedExtentList
impl Debug for SliverVariedExtentList
Source§impl RenderObjectWidget for SliverVariedExtentList
impl RenderObjectWidget for SliverVariedExtentList
Source§type RenderObject = RenderSliverVariedExtentList
type RenderObject = RenderSliverVariedExtentList
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<RenderSliverVariedExtentList>,
)
fn update_render_object( &self, app: &mut App, _context: BuildContext, render_object: RenderHandle<RenderSliverVariedExtentList>, )
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.Source§impl SliverMultiBoxAdaptorWidget for SliverVariedExtentList
impl SliverMultiBoxAdaptorWidget for SliverVariedExtentList
Source§fn delegate(&self) -> &SliverChildDelegateRef
fn delegate(&self) -> &SliverChildDelegateRef
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
SliverMultiBoxAdaptorWidget.debugFillProperties, which a subclass’s own body
calls where Dart writes super.Source§fn create_element(&self, app: &mut App, this: WidgetRef) -> AnyElementwhere
Self: Sized,
fn create_element(&self, app: &mut App, this: WidgetRef) -> AnyElementwhere
Self: Sized,
impl SliverWithKeepAliveWidget for SliverVariedExtentList
Auto Trait Implementations§
impl !RefUnwindSafe for SliverVariedExtentList
impl !Send for SliverVariedExtentList
impl !Sync for SliverVariedExtentList
impl !UnwindSafe for SliverVariedExtentList
impl Forget for SliverVariedExtentList
impl Freeze for SliverVariedExtentListwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn SliverChildDelegate> is !null: Freeze,
PhantomData<RcInner<dyn SliverChildDelegate>>: Freeze,
*const RcInner<dyn Fn(i32, SliverLayoutDimensions) -> Option<f64>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(i32, SliverLayoutDimensions) -> Option<f64>>>: Freeze,
impl Move for SliverVariedExtentList
impl Unpin for SliverVariedExtentList
impl UnsafeUnpin for SliverVariedExtentListwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn SliverChildDelegate> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn SliverChildDelegate>>: UnsafeUnpin,
*const RcInner<dyn Fn(i32, SliverLayoutDimensions) -> Option<f64>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(i32, SliverLayoutDimensions) -> Option<f64>>>: 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<SliverMultiBoxAdaptorKind> for Wwhere
W: SliverMultiBoxAdaptorWidget,
<W as RenderObjectWidget>::RenderObject: RenderSliverMultiBoxAdaptor,
impl<W> IntoWidget<SliverMultiBoxAdaptorKind> for Wwhere
W: SliverMultiBoxAdaptorWidget,
<W as RenderObjectWidget>::RenderObject: RenderSliverMultiBoxAdaptor,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.