Skip to main content

SliverMultiBoxAdaptorElementBase

Trait SliverMultiBoxAdaptorElementBase 

Source
pub trait SliverMultiBoxAdaptorElementBase: RenderObjectElement + RenderObjectElementWidget{
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§

Source

fn adaptor_data( self: Handle<Self>, app: &App, ) -> &SliverMultiBoxAdaptorElementData

The lazily built children, held under the field adaptor.

Source

fn adaptor_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut SliverMultiBoxAdaptorElementData

Provided Methods§

Source

fn as_child_manager(self: Handle<Self>) -> Rc<dyn RenderSliverBoxChildManager>

This element as the RenderSliverBoxChildManager its render object holds.

Source

fn build(self: Handle<Self>, app: &mut App, index: i32) -> Option<WidgetRef>

Flutter’s _build.

Source

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.

Source

fn adaptor_parent_data( app: &App, child: Option<AnyElement>, ) -> Option<AnyRenderObject>

The child’s render object, when it carries a SliverMultiBoxAdaptorParentData.

Source

fn layout_offset(app: &App, object: AnyRenderObject) -> Option<f64>

The layout offset in the child’s SliverMultiBoxAdaptorParentData.

Source

fn set_layout_offset(app: &mut App, object: AnyRenderObject, value: Option<f64>)

Sets the layout offset in the child’s SliverMultiBoxAdaptorParentData.

Source

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.

Source

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.

Source

fn in_build_scope( self: Handle<Self>, app: &mut App, callback: impl FnOnce(&mut App) + 'static, )

Dart’s owner!.buildScope(this, callback).

Source

fn create_child( self: Handle<Self>, app: &mut App, index: i32, after: Option<AnyRenderBox>, )

RenderSliverBoxChildManager::create_child.

Source

fn remove_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)

RenderSliverBoxChildManager::remove_child.

Source

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.

Source

fn estimated_child_count(self: Handle<Self>, app: &App) -> Option<i32>

RenderSliverBoxChildManager::estimated_child_count.

Source

fn child_count(self: Handle<Self>, app: &mut App) -> i32

RenderSliverBoxChildManager::child_count.

Source

fn did_start_layout(self: Handle<Self>, app: &App)

RenderSliverBoxChildManager::did_start_layout.

Source

fn did_finish_layout(self: Handle<Self>, app: &App)

RenderSliverBoxChildManager::did_finish_layout.

Source

fn debug_assert_child_list_locked(self: Handle<Self>, app: &App) -> bool

RenderSliverBoxChildManager::debug_assert_child_list_locked.

Source

fn did_adopt_child(self: Handle<Self>, app: &mut App, child: AnyRenderBox)

RenderSliverBoxChildManager::did_adopt_child.

Source

fn set_did_underflow(self: Handle<Self>, app: &mut App, value: bool)

RenderSliverBoxChildManager::set_did_underflow.

Source

fn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef)

SliverMultiBoxAdaptorElement.update.

Source

fn perform_rebuild(self: Handle<Self>, app: &mut App)

SliverMultiBoxAdaptorElement.performRebuild.

Source

fn forget_child(self: Handle<Self>, app: &mut App, child: AnyElement)

SliverMultiBoxAdaptorElement.forgetChild.

Source

fn visit_children( self: Handle<Self>, app: &App, visitor: &mut dyn FnMut(AnyElement), )

SliverMultiBoxAdaptorElement.visitChildren.

Source

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.

Source

fn insert_render_object_child( self: Handle<Self>, app: &mut App, child: AnyRenderObject, slot: Option<Slot>, )

SliverMultiBoxAdaptorElement.insertRenderObjectChild.

Source

fn move_render_object_child( self: Handle<Self>, app: &mut App, child: AnyRenderObject, _old_slot: Option<Slot>, new_slot: Option<Slot>, )

SliverMultiBoxAdaptorElement.moveRenderObjectChild.

Source

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".

Implementors§