pub trait SliverMultiBoxAdaptorElementBase: RenderObjectElement + RenderObjectElementWidgetwhere
Self::Widget: SliverMultiBoxAdaptorWidget,
<Self::Widget as RenderObjectWidget>::RenderObject: RenderSliverMultiBoxAdaptor,{
Show 29 methods
// Required methods
fn adaptor_data(
self: Handle<Self>,
app: &App,
) -> &SliverMultiBoxAdaptorElementData;
fn adaptor_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut SliverMultiBoxAdaptorElementData;
// Provided methods
fn as_child_manager(
self: Handle<Self>,
) -> Rc<dyn RenderSliverBoxChildManager> { ... }
fn build(self: Handle<Self>, app: &mut App, index: i32) -> Option<WidgetRef> { ... }
fn update_child(
self: Handle<Self>,
app: &mut App,
child: Option<AnyElement>,
new_widget: Option<WidgetRef>,
new_slot: Option<Slot>,
) -> Option<AnyElement> { ... }
fn adaptor_parent_data(
app: &App,
child: Option<AnyElement>,
) -> Option<AnyRenderObject> { ... }
fn layout_offset(app: &App, object: AnyRenderObject) -> Option<f64> { ... }
fn set_layout_offset(
app: &mut App,
object: AnyRenderObject,
value: Option<f64>,
) { ... }
fn process_element(
self: Handle<Self>,
app: &mut App,
index: i32,
new_children: &BTreeMap<i32, Option<AnyElement>>,
index_to_layout_offset: &HashMap<i32, f64>,
children_updated: &mut bool,
) { ... }
fn extrapolate_max_scroll_offset(
first_index: i32,
last_index: i32,
leading_scroll_offset: f64,
trailing_scroll_offset: f64,
child_count: i32,
) -> f64 { ... }
fn in_build_scope(
self: Handle<Self>,
app: &mut App,
callback: impl FnOnce(&mut App) + 'static,
) { ... }
fn create_child(
self: Handle<Self>,
app: &mut App,
index: i32,
after: Option<AnyRenderBox>,
) { ... }
fn remove_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox) { ... }
fn estimate_max_scroll_offset(
self: Handle<Self>,
app: &App,
constraints: SliverConstraints,
first_index: Option<i32>,
last_index: Option<i32>,
leading_scroll_offset: Option<f64>,
trailing_scroll_offset: Option<f64>,
) -> f64 { ... }
fn estimated_child_count(self: Handle<Self>, app: &App) -> Option<i32> { ... }
fn child_count(self: Handle<Self>, app: &mut App) -> i32 { ... }
fn did_start_layout(self: Handle<Self>, app: &App) { ... }
fn did_finish_layout(self: Handle<Self>, app: &App) { ... }
fn debug_assert_child_list_locked(self: Handle<Self>, app: &App) -> bool { ... }
fn did_adopt_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox) { ... }
fn set_did_underflow(self: Handle<Self>, app: &mut App, value: bool) { ... }
fn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef) { ... }
fn perform_rebuild(self: Handle<Self>, app: &mut App) { ... }
fn forget_child(self: Handle<Self>, app: &mut App, child: AnyElement) { ... }
fn visit_children(
self: Handle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyElement),
) { ... }
fn debug_visit_onstage_children(
self: Handle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyElement),
) { ... }
fn insert_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
slot: Option<Slot>,
) { ... }
fn move_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
_old_slot: Option<Slot>,
new_slot: Option<Slot>,
) { ... }
fn remove_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
_slot: Option<Slot>,
) { ... }
}Expand description
The bodies of Dart’s SliverMultiBoxAdaptorElement: an element that lazily builds children
for a SliverMultiBoxAdaptorWidget.
Implements RenderSliverBoxChildManager, which lets this element manage the children of
implementors of RenderSliverMultiBoxAdaptor. The render object holds the manager as an
Rc<dyn RenderSliverBoxChildManager> (as_child_manager), which
the widget hands it in create_render_object after casting the BuildContext back to this
element.
Flutter’s class is instantiable and also subclassed (SliverPrototypeExtentList’s element),
so the bodies live on this trait and SliverMultiBoxAdaptorElement is the plain leaf that
implements it; a subclass calls the body it overrides by name where Dart writes super.
Required Methods§
Sourcefn adaptor_data(
self: Handle<Self>,
app: &App,
) -> &SliverMultiBoxAdaptorElementData
fn adaptor_data( self: Handle<Self>, app: &App, ) -> &SliverMultiBoxAdaptorElementData
The lazily built children, held under the field adaptor.
Sourcefn adaptor_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut SliverMultiBoxAdaptorElementData
fn adaptor_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut SliverMultiBoxAdaptorElementData
See adaptor_data.
Provided Methods§
Sourcefn as_child_manager(self: Handle<Self>) -> Rc<dyn RenderSliverBoxChildManager>
fn as_child_manager(self: Handle<Self>) -> Rc<dyn RenderSliverBoxChildManager>
This element as the RenderSliverBoxChildManager its render object holds.
Sourcefn update_child(
self: Handle<Self>,
app: &mut App,
child: Option<AnyElement>,
new_widget: Option<WidgetRef>,
new_slot: Option<Slot>,
) -> Option<AnyElement>
fn update_child( self: Handle<Self>, app: &mut App, child: Option<AnyElement>, new_widget: Option<WidgetRef>, new_slot: Option<Slot>, ) -> Option<AnyElement>
SliverMultiBoxAdaptorElement.updateChild: preserves the old layout offset when the
render object was swapped out.
Sourcefn adaptor_parent_data(
app: &App,
child: Option<AnyElement>,
) -> Option<AnyRenderObject>
fn adaptor_parent_data( app: &App, child: Option<AnyElement>, ) -> Option<AnyRenderObject>
The child’s render object, when it carries a SliverMultiBoxAdaptorParentData.
Sourcefn layout_offset(app: &App, object: AnyRenderObject) -> Option<f64>
fn layout_offset(app: &App, object: AnyRenderObject) -> Option<f64>
The layout offset in the child’s SliverMultiBoxAdaptorParentData.
Sourcefn set_layout_offset(app: &mut App, object: AnyRenderObject, value: Option<f64>)
fn set_layout_offset(app: &mut App, object: AnyRenderObject, value: Option<f64>)
Sets the layout offset in the child’s SliverMultiBoxAdaptorParentData.
Sourcefn process_element(
self: Handle<Self>,
app: &mut App,
index: i32,
new_children: &BTreeMap<i32, Option<AnyElement>>,
index_to_layout_offset: &HashMap<i32, f64>,
children_updated: &mut bool,
)
fn process_element( self: Handle<Self>, app: &mut App, index: i32, new_children: &BTreeMap<i32, Option<AnyElement>>, index_to_layout_offset: &HashMap<i32, f64>, children_updated: &mut bool, )
Flutter’s processElement closure inside performRebuild.
Sourcefn extrapolate_max_scroll_offset(
first_index: i32,
last_index: i32,
leading_scroll_offset: f64,
trailing_scroll_offset: f64,
child_count: i32,
) -> f64
fn extrapolate_max_scroll_offset( first_index: i32, last_index: i32, leading_scroll_offset: f64, trailing_scroll_offset: f64, child_count: i32, ) -> f64
Flutter’s _extrapolateMaxScrollOffset.
Sourcefn in_build_scope(
self: Handle<Self>,
app: &mut App,
callback: impl FnOnce(&mut App) + 'static,
)
fn in_build_scope( self: Handle<Self>, app: &mut App, callback: impl FnOnce(&mut App) + 'static, )
Dart’s owner!.buildScope(this, callback).
Sourcefn create_child(
self: Handle<Self>,
app: &mut App,
index: i32,
after: Option<AnyRenderBox>,
)
fn create_child( self: Handle<Self>, app: &mut App, index: i32, after: Option<AnyRenderBox>, )
RenderSliverBoxChildManager::create_child.
Sourcefn remove_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)
fn remove_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)
RenderSliverBoxChildManager::remove_child.
Sourcefn estimate_max_scroll_offset(
self: Handle<Self>,
app: &App,
constraints: SliverConstraints,
first_index: Option<i32>,
last_index: Option<i32>,
leading_scroll_offset: Option<f64>,
trailing_scroll_offset: Option<f64>,
) -> f64
fn estimate_max_scroll_offset( self: Handle<Self>, app: &App, constraints: SliverConstraints, first_index: Option<i32>, last_index: Option<i32>, leading_scroll_offset: Option<f64>, trailing_scroll_offset: Option<f64>, ) -> f64
RenderSliverBoxChildManager::estimate_max_scroll_offset.
Sourcefn estimated_child_count(self: Handle<Self>, app: &App) -> Option<i32>
fn estimated_child_count(self: Handle<Self>, app: &App) -> Option<i32>
RenderSliverBoxChildManager::estimated_child_count.
Sourcefn child_count(self: Handle<Self>, app: &mut App) -> i32
fn child_count(self: Handle<Self>, app: &mut App) -> i32
RenderSliverBoxChildManager::child_count.
Sourcefn did_start_layout(self: Handle<Self>, app: &App)
fn did_start_layout(self: Handle<Self>, app: &App)
RenderSliverBoxChildManager::did_start_layout.
Sourcefn did_finish_layout(self: Handle<Self>, app: &App)
fn did_finish_layout(self: Handle<Self>, app: &App)
RenderSliverBoxChildManager::did_finish_layout.
Sourcefn debug_assert_child_list_locked(self: Handle<Self>, app: &App) -> bool
fn debug_assert_child_list_locked(self: Handle<Self>, app: &App) -> bool
RenderSliverBoxChildManager::debug_assert_child_list_locked.
Sourcefn did_adopt_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)
fn did_adopt_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)
RenderSliverBoxChildManager::did_adopt_child.
Sourcefn set_did_underflow(self: Handle<Self>, app: &mut App, value: bool)
fn set_did_underflow(self: Handle<Self>, app: &mut App, value: bool)
RenderSliverBoxChildManager::set_did_underflow.
Sourcefn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef)
fn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef)
SliverMultiBoxAdaptorElement.update.
Sourcefn perform_rebuild(self: Handle<Self>, app: &mut App)
fn perform_rebuild(self: Handle<Self>, app: &mut App)
SliverMultiBoxAdaptorElement.performRebuild.
Sourcefn forget_child(self: Handle<Self>, app: &mut App, child: AnyElement)
fn forget_child(self: Handle<Self>, app: &mut App, child: AnyElement)
SliverMultiBoxAdaptorElement.forgetChild.
Sourcefn visit_children(
self: Handle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyElement),
)
fn visit_children( self: Handle<Self>, app: &App, visitor: &mut dyn FnMut(AnyElement), )
SliverMultiBoxAdaptorElement.visitChildren.
Sourcefn debug_visit_onstage_children(
self: Handle<Self>,
app: &App,
visitor: &mut dyn FnMut(AnyElement),
)
fn debug_visit_onstage_children( self: Handle<Self>, app: &App, visitor: &mut dyn FnMut(AnyElement), )
Dart’s SliverMultiBoxAdaptorElement.debugVisitOnstageChildren: the children whose
layout offset falls in the sliver’s painted window, which a kept-alive child’s does not.
Sourcefn insert_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
slot: Option<Slot>,
)
fn insert_render_object_child( self: Handle<Self>, app: &mut App, child: AnyRenderObject, slot: Option<Slot>, )
SliverMultiBoxAdaptorElement.insertRenderObjectChild.
Sourcefn move_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
_old_slot: Option<Slot>,
new_slot: Option<Slot>,
)
fn move_render_object_child( self: Handle<Self>, app: &mut App, child: AnyRenderObject, _old_slot: Option<Slot>, new_slot: Option<Slot>, )
SliverMultiBoxAdaptorElement.moveRenderObjectChild.
Sourcefn remove_render_object_child(
self: Handle<Self>,
app: &mut App,
child: AnyRenderObject,
_slot: Option<Slot>,
)
fn remove_render_object_child( self: Handle<Self>, app: &mut App, child: AnyRenderObject, _slot: Option<Slot>, )
SliverMultiBoxAdaptorElement.removeRenderObjectChild.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".