pub struct SliverFixedExtentList {
pub key: Option<KeyRef>,
pub delegate: SliverChildDelegateRef,
pub item_extent: f64,
}Expand description
A sliver that places multiple box children with the same main axis extent in a linear array.
To learn more about slivers, see CustomScrollView::slivers.
SliverFixedExtentList places its children in a linear array along the main axis starting
at offset zero and without gaps. Each child is forced to have the
item_extent in the main axis and the
SliverConstraints::cross_axis_extent in the cross axis.
SliverFixedExtentList is more efficient than SliverList because
SliverFixedExtentList does not need to perform layout on its children to obtain their
extent in the main axis.
See also:
SliverVariedExtentList, which supports children with varying (but known upfront) extents.SliverList, which does not require its children to have the same extent in the main axis.
Fields§
§key: Option<KeyRef>§delegate: SliverChildDelegateRefThe delegate that provides the children for this widget.
item_extent: f64The extent the children are forced to have in the main axis.
Implementations§
Source§impl SliverFixedExtentList
impl SliverFixedExtentList
Sourcepub fn new(
delegate: SliverChildDelegateRef,
item_extent: f64,
) -> SliverFixedExtentList
pub fn new( delegate: SliverChildDelegateRef, item_extent: f64, ) -> SliverFixedExtentList
Creates a sliver that places box children with the same main axis extent in a linear array.
Sourcepub fn builder(
item_builder: impl Fn(&mut App, BuildContext, i32) -> Option<WidgetRef> + 'static,
item_extent: f64,
) -> SliverFixedExtentListBuilder
pub fn builder( item_builder: impl Fn(&mut App, BuildContext, i32) -> Option<WidgetRef> + 'static, item_extent: f64, ) -> SliverFixedExtentListBuilder
A sliver that places multiple box children in a linear array along the main axis, built lazily.
This constructor is appropriate for sliver lists with a large (or infinite) number of children whose extent is already determined.
Sourcepub fn list(
children: Vec<WidgetRef>,
item_extent: f64,
) -> SliverFixedExtentListList
pub fn list( children: Vec<WidgetRef>, item_extent: f64, ) -> SliverFixedExtentListList
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) -> SliverFixedExtentList
pub fn key(self, key: KeyRef) -> SliverFixedExtentList
Dart SliverFixedExtentList(key:).
Trait Implementations§
Source§impl Debug for SliverFixedExtentList
impl Debug for SliverFixedExtentList
Source§impl RenderObjectWidget for SliverFixedExtentList
impl RenderObjectWidget for SliverFixedExtentList
Source§type RenderObject = RenderSliverFixedExtentList
type RenderObject = RenderSliverFixedExtentList
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<RenderSliverFixedExtentList>,
)
fn update_render_object( &self, app: &mut App, _context: BuildContext, render_object: RenderHandle<RenderSliverFixedExtentList>, )
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 SliverFixedExtentList
impl SliverMultiBoxAdaptorWidget for SliverFixedExtentList
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 SliverFixedExtentList
Auto Trait Implementations§
impl !RefUnwindSafe for SliverFixedExtentList
impl !Send for SliverFixedExtentList
impl !Sync for SliverFixedExtentList
impl !UnwindSafe for SliverFixedExtentList
impl Forget for SliverFixedExtentList
impl Freeze for SliverFixedExtentListwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const RcInner<dyn SliverChildDelegate> is !null: Freeze,
PhantomData<RcInner<dyn SliverChildDelegate>>: Freeze,
impl Move for SliverFixedExtentList
impl Unpin for SliverFixedExtentList
impl UnsafeUnpin for SliverFixedExtentListwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn SliverChildDelegate> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn SliverChildDelegate>>: 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.