Skip to main content

RenderFlex

Struct RenderFlex 

Source
pub struct RenderFlex { /* private fields */ }
Expand description

Displays its children in a one-dimensional array.

§Layout algorithm

This section describes how the framework causes RenderFlex to position its children. See BoxConstraints for an introduction to box layout models.

Layout for a RenderFlex proceeds in six steps:

  1. Layout each child with a null or zero flex factor with unbounded main axis constraints and the incoming cross axis constraints. If the cross_axis_alignment is CrossAxisAlignment::Stretch, instead use tight cross axis constraints that match the incoming max extent in the cross axis.
  2. Divide the remaining main axis space among the children with non-zero flex factors according to their flex factor. For example, a child with a flex factor of 2.0 will receive twice the amount of main axis space as a child with a flex factor of 1.0.
  3. Layout each of the remaining children with the same cross axis constraints as in step 1, but instead of using unbounded main axis constraints, use max axis constraints based on the amount of space allocated in step 2. Children with FlexFit::Tight are given tight constraints (i.e., forced to fill the allocated space), and children with FlexFit::Loose are given loose constraints (i.e., not forced to fill the allocated space).
  4. The cross axis extent of the RenderFlex is the maximum cross axis extent of the children (which will always satisfy the incoming constraints).
  5. The main axis extent of the RenderFlex is determined by the main_axis_size property. If it is MainAxisSize::Max, then the main axis extent of the RenderFlex is the max extent of the incoming main axis constraints. If it is MainAxisSize::Min, then the main axis extent is the sum of the main axis extents of the children (subject to the incoming constraints).
  6. Determine the position for each child according to the main_axis_alignment and the cross_axis_alignment. For example, if the main_axis_alignment is MainAxisAlignment::SpaceBetween, any main axis space that has not been allocated to children is divided evenly and placed between the children.

Implementations§

Source§

impl RenderFlex

Source

pub fn new(app: &mut App) -> RenderHandle<RenderFlex>

Creates a flex render object.

By default, the flex layout is horizontal and children are aligned to the start of the main axis and the center of the cross axis. Add children with add or add_all; Dart’s constructor takes them.

Source

pub fn direction(self: RenderHandle<Self>, app: &App) -> Axis

Source

pub fn set_direction(self: RenderHandle<Self>, app: &mut App, value: Axis)

Source

pub fn main_axis_alignment( self: RenderHandle<Self>, app: &App, ) -> MainAxisAlignment

Source

pub fn set_main_axis_alignment( self: RenderHandle<Self>, app: &mut App, value: MainAxisAlignment, )

Source

pub fn main_axis_size(self: RenderHandle<Self>, app: &App) -> MainAxisSize

Source

pub fn set_main_axis_size( self: RenderHandle<Self>, app: &mut App, value: MainAxisSize, )

Source

pub fn cross_axis_alignment( self: RenderHandle<Self>, app: &App, ) -> CrossAxisAlignment

Source

pub fn set_cross_axis_alignment( self: RenderHandle<Self>, app: &mut App, value: CrossAxisAlignment, )

Source

pub fn text_direction( self: RenderHandle<Self>, app: &App, ) -> Option<TextDirection>

Source

pub fn set_text_direction( self: RenderHandle<Self>, app: &mut App, value: Option<TextDirection>, )

Source

pub fn vertical_direction( self: RenderHandle<Self>, app: &App, ) -> VerticalDirection

Source

pub fn set_vertical_direction( self: RenderHandle<Self>, app: &mut App, value: VerticalDirection, )

Source

pub fn text_baseline( self: RenderHandle<Self>, app: &App, ) -> Option<TextBaseline>

Source

pub fn set_text_baseline( self: RenderHandle<Self>, app: &mut App, value: Option<TextBaseline>, )

Source

pub fn clip_behavior(self: RenderHandle<Self>, app: &App) -> Clip

Source

pub fn set_clip_behavior(self: RenderHandle<Self>, app: &mut App, value: Clip)

Source

pub fn spacing(self: RenderHandle<Self>, app: &App) -> f64

Source

pub fn set_spacing(self: RenderHandle<Self>, app: &mut App, value: f64)

Trait Implementations§

Source§

impl ContainerRenderObjectMixin for RenderFlex

Source§

type ChildType = AnyRenderBox

Flutter’s ChildType: the protocol of this render object’s children.
Source§

type ParentDataType = FlexParentData

Flutter’s ParentDataType: the parent data this render object installs on its children.
Source§

fn container_data( self: RenderHandle<Self>, app: &App, ) -> &ContainerRenderObjectData<AnyRenderBox>

Mixin field access.
Source§

fn container_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut ContainerRenderObjectData<AnyRenderBox>

Source§

fn child_count(self: RenderHandle<Self>, app: &App) -> usize

The number of children.
Source§

fn insert( self: RenderHandle<Self>, app: &mut App, child: Self::ChildType, after: Option<Self::ChildType>, )

Insert child into this render object’s child list after the given child. Read more
Source§

fn add(self: RenderHandle<Self>, app: &mut App, child: Self::ChildType)

Append child to the end of this render object’s child list.
Source§

fn add_all( self: RenderHandle<Self>, app: &mut App, children: Option<Vec<Self::ChildType>>, )

Add all the children to the end of this render object’s child list.
Source§

fn remove(self: RenderHandle<Self>, app: &mut App, child: Self::ChildType)

Remove this child from the child list. Read more
Source§

fn remove_all(self: RenderHandle<Self>, app: &mut App)

Remove all their children from this render object’s child list. Read more
Source§

fn move_child( self: RenderHandle<Self>, app: &mut App, child: Self::ChildType, after: Option<Self::ChildType>, )

Move the given child in the child list to be after another child. Read more
Source§

fn did_attach( self: RenderHandle<Self>, app: &mut App, owner: Handle<PipelineOwner>, )

The body of Flutter’s attach override: attaches every child in the list.
Source§

fn did_detach(self: RenderHandle<Self>, app: &mut App)

The body of Flutter’s detach override: detaches every child in the list.
Source§

fn redepth_children(self: RenderHandle<Self>, app: &mut App)

Flutter’s redepthChildren: walks the child list.
Source§

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

Flutter’s visitChildren: walks the child list.
Source§

fn first_child(self: RenderHandle<Self>, app: &App) -> Option<Self::ChildType>

The first child in the child list.
Source§

fn last_child(self: RenderHandle<Self>, app: &App) -> Option<Self::ChildType>

The last child in the child list.
Source§

fn child_before( self: RenderHandle<Self>, app: &App, child: Self::ChildType, ) -> Option<Self::ChildType>

The previous child before the given child in the child list.
Source§

fn child_after( self: RenderHandle<Self>, app: &App, child: Self::ChildType, ) -> Option<Self::ChildType>

The next child after the given child in the child list.
Source§

fn children_as_list(self: RenderHandle<Self>, app: &App) -> Vec<Self::ChildType>

Returns a list containing the children of this render object. Read more
Source§

impl RenderBox for RenderFlex

Source§

fn render_box_data(self: RenderHandle<Self>, app: &App) -> &RenderBoxData

Mixin field access.
Source§

fn render_box_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderBoxData

Source§

fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )

Installs BoxParentData unless the child already has it. Read more
Source§

fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Computes the value returned by get_min_intrinsic_width. Do not call this function directly, instead, call get_min_intrinsic_width. Read more
Source§

fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Computes the value returned by get_max_intrinsic_width. Do not call this function directly, instead, call get_max_intrinsic_width. Read more
Source§

fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Computes the value returned by get_min_intrinsic_height. Do not call this function directly, instead, call get_min_intrinsic_height. Read more
Source§

fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Computes the value returned by get_max_intrinsic_height. Do not call this function directly, instead, call get_max_intrinsic_height. Read more
Source§

fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

Returns the distance from the y-coordinate of the position of the box to the y-coordinate of the first given baseline in the box’s contents, if any, or None otherwise. Read more
Source§

fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>

Computes the value returned by get_dry_baseline. Read more
Source§

fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size

Computes the value returned by get_dry_layout. Do not call this function directly, instead, call get_dry_layout. Read more
Source§

fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Override this method to check whether any children are located at the given position. Read more
Source§

fn constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints

The box constraints most recently supplied by the parent. Read more
Source§

fn get_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Source§

fn get_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Source§

fn get_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Source§

fn get_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Source§

fn get_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size

Source§

fn get_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>

Source§

fn debug_cannot_compute_dry_layout( self: RenderHandle<Self>, failure: DryLayoutFailure<'_>, )

Called from compute_dry_layout or compute_dry_baseline if this box does not support calculating a dry layout. Read more
Source§

fn get_distance_to_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, only_real: bool, ) -> Option<f64>

Source§

fn get_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

Source§

fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)

Mark this render object’s layout information as dirty. Read more
Source§

fn perform_resize(self: RenderHandle<Self>, app: &mut App)

Updates the box’s size using only the constraints. Read more
Source§

fn size(self: RenderHandle<Self>, app: &App) -> Size

The size of this box.
Source§

fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )

Multiply the transform from the parent’s coordinate system to this box’s coordinate system into the given transform. Read more
Source§

fn paint_bounds(self: RenderHandle<Self>, app: &App) -> Rect

An estimate of the bounds within which this render object will paint: the box’s own size.
Source§

fn has_size(self: RenderHandle<Self>, app: &App) -> bool

Whether this render object has undergone layout and has a size.
Source§

fn handle_event( self: RenderHandle<Self>, app: &mut App, event: &PointerEvent, entry: &BoxHitTestEntry, )

Override this method to handle pointer events that hit this render object. Read more
Source§

fn hit_test( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Determines the set of render objects located at the given position. Read more
Source§

fn hit_test_self( self: RenderHandle<Self>, _app: &App, _position: Offset, ) -> bool

Override this method if this render object can be hit even if its children were not hit. Read more
Source§

fn set_size(self: RenderHandle<Self>, app: &mut App, size: Size)

Sets the size of this box. Call from RenderObject::perform_layout or RenderObject::perform_resize.
Source§

fn layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, parent_uses_size: bool, )

Source§

fn as_box(self: RenderHandle<Self>) -> AnyRenderBox

The type-erased RenderBox handle. Free: the vtable is a const, and the id is copied.
Source§

fn as_object(self: RenderHandle<Self>) -> AnyRenderObject

The type-erased RenderObject handle, through as_box.
Source§

fn adopt_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)

Source§

fn drop_child(self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject)

Source§

fn mark_needs_paint(self: RenderHandle<Self>, app: &mut App)

Source§

fn mark_needs_composited_layer_update(self: RenderHandle<Self>, app: &mut App)

Source§

fn mark_needs_compositing_bits_update(self: RenderHandle<Self>, app: &mut App)

Source§

fn schedule_initial_layout(self: RenderHandle<Self>, app: &mut App)

Source§

fn parent(self: RenderHandle<Self>, app: &App) -> Option<AnyRenderObject>

Source§

fn owner(self: RenderHandle<Self>, app: &App) -> Option<Handle<PipelineOwner>>

Source§

fn attached(self: RenderHandle<Self>, app: &App) -> bool

Source§

fn debug_needs_layout(self: RenderHandle<Self>, app: &App) -> bool

Source§

impl RenderBoxContainerDefaultsMixin for RenderFlex

Source§

fn default_compute_distance_to_first_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

Returns the baseline of the first child with a baseline. Read more
Source§

fn default_compute_distance_to_highest_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

Returns the minimum baseline value among every child. Read more
Source§

fn default_hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Performs a hit test on each child by walking the child list backwards. Read more
Source§

fn default_paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )

Paints each child by walking the child list forwards. Read more
Source§

impl RenderFlexMixin for RenderFlex

Source§

fn flex_data(self: RenderHandle<Self>, app: &App) -> &RenderFlexData

Mixin field access.
Source§

fn flex_data_mut(self: RenderHandle<Self>, app: &mut App) -> &mut RenderFlexData

Source§

fn direction(self: RenderHandle<Self>, app: &App) -> Axis

The direction to use as the main axis.
Source§

fn set_direction(self: RenderHandle<Self>, app: &mut App, value: Axis)

Sets direction.
Source§

fn main_axis_alignment(self: RenderHandle<Self>, app: &App) -> MainAxisAlignment

How the children should be placed along the main axis. Read more
Source§

fn set_main_axis_alignment( self: RenderHandle<Self>, app: &mut App, value: MainAxisAlignment, )

Source§

fn main_axis_size(self: RenderHandle<Self>, app: &App) -> MainAxisSize

How much space should be occupied in the main axis. Read more
Source§

fn set_main_axis_size( self: RenderHandle<Self>, app: &mut App, value: MainAxisSize, )

Source§

fn cross_axis_alignment( self: RenderHandle<Self>, app: &App, ) -> CrossAxisAlignment

How the children should be placed along the cross axis. Read more
Source§

fn set_cross_axis_alignment( self: RenderHandle<Self>, app: &mut App, value: CrossAxisAlignment, )

Source§

fn text_direction(self: RenderHandle<Self>, app: &App) -> Option<TextDirection>

Determines the order to lay children out horizontally and how to interpret start and end in the horizontal direction. Read more
Source§

fn set_text_direction( self: RenderHandle<Self>, app: &mut App, value: Option<TextDirection>, )

Source§

fn vertical_direction(self: RenderHandle<Self>, app: &App) -> VerticalDirection

Determines the order to lay children out vertically and how to interpret start and end in the vertical direction. Read more
Source§

fn set_vertical_direction( self: RenderHandle<Self>, app: &mut App, value: VerticalDirection, )

Source§

fn text_baseline(self: RenderHandle<Self>, app: &App) -> Option<TextBaseline>

If aligning items according to their baseline, which baseline to use. Read more
Source§

fn set_text_baseline( self: RenderHandle<Self>, app: &mut App, value: Option<TextBaseline>, )

Source§

fn has_overflow(self: RenderHandle<Self>, app: &App) -> bool

Whether the flex overflowed along the main axis. Read more
Source§

fn clip_behavior(self: RenderHandle<Self>, app: &App) -> Clip

How to clip the children that overflow along the main axis. Read more
Source§

fn set_clip_behavior(self: RenderHandle<Self>, app: &mut App, value: Clip)

Source§

fn spacing(self: RenderHandle<Self>, app: &App) -> f64

How much space to place between children in the main axis. Read more
Source§

fn set_spacing(self: RenderHandle<Self>, app: &mut App, value: f64)

Sets spacing.
Source§

fn debug_has_necessary_directions(self: RenderHandle<Self>, app: &App) -> bool

Flutter’s _debugHasNecessaryDirections: asserts the directions the current alignment needs are available. Always returns true. Internal to the flex layout.
Source§

fn is_baseline_aligned(self: RenderHandle<Self>, app: &App) -> bool

Whether the children are placed on a shared baseline: a CrossAxisAlignment::Baseline along a horizontal main axis. Internal to the flex layout.
Source§

fn get_cross_size(self: RenderHandle<Self>, app: &App, size: Size) -> f64

The extent of size along the cross axis. Internal to the flex layout.
Source§

fn get_main_size(self: RenderHandle<Self>, app: &App, size: Size) -> f64

The extent of size along the main axis. Internal to the flex layout.
Source§

fn flip_main_axis(self: RenderHandle<Self>, app: &App) -> bool

Whether to lay out left-to-right / top-to-bottom (false), or right-to-left / bottom-to-top (true). false when the layout direction does not matter (for instance, there is no child). Internal to the flex layout.
Source§

fn flip_cross_axis(self: RenderHandle<Self>, app: &App) -> bool

The cross axis counterpart of flip_main_axis. Internal to the flex layout.
Source§

fn constraints_for_non_flex_child( self: RenderHandle<Self>, app: &App, constraints: BoxConstraints, ) -> BoxConstraints

The constraints an inflexible child is laid out with. Internal to the flex layout.
Source§

fn constraints_for_flex_child( self: RenderHandle<Self>, app: &App, child: AnyRenderBox, constraints: BoxConstraints, max_child_extent: f64, ) -> BoxConstraints

The constraints a flexible child is laid out with, given the main axis extent it was allocated. Internal to the flex layout.
Source§

fn get_intrinsic_size( self: RenderHandle<Self>, app: &mut App, sizing_direction: Axis, extent: f64, child_size: fn(AnyRenderBox, &mut App, f64) -> f64, ) -> f64

Flutter’s _getIntrinsicSize: the intrinsic extent along sizing_direction, given the extent in the other direction and a child_size that measures one child. Internal to the flex layout.
Source§

fn debug_check_constraints( self: RenderHandle<Self>, app: &App, constraints: BoxConstraints, ) -> Option<String>

Flutter’s _debugCheckConstraints: the error to report when a child has a non-zero flex factor while the incoming main axis constraint is unbounded and that child would have to fill it, or None when the constraints are usable. Internal to the flex layout.
Source§

fn compute_sizes( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, layout_child: impl FnMut(&mut App, AnyRenderBox, BoxConstraints) -> Size, get_baseline: ChildBaselineGetter, ) -> LayoutSizes

Flutter’s _computeSizes: measures the children with layout_child, reads their baselines with get_baseline when they are baseline aligned, and works out this flex’s own size. Internal to the flex layout. Read more
Source§

fn perform_layout(self: RenderHandle<Self>, app: &mut App)

Sizes this flex and positions its children; see RenderFlex for the algorithm.
Source§

fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )

Paints the children, clipping them to this flex when they overflow the main axis.
Source§

fn dispose(self: RenderHandle<Self>, app: &mut App)

Flutter’s dispose: drop the clip layer handle, then super.dispose().
Source§

fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )

A flex child gets a FlexParentData.
Source§

fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

The minimum intrinsic width of the children laid out in a flex.
Source§

fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

The maximum intrinsic width of the children laid out in a flex.
Source§

fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

The minimum intrinsic height of the children laid out in a flex.
Source§

fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

The maximum intrinsic height of the children laid out in a flex.
Source§

fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

A row’s highest child baseline, or a column’s first child baseline.
Source§

fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>

The baseline compute_distance_to_actual_baseline would answer, measuring the children dry; a baseline-aligned flex answers its shared baseline.
Source§

fn compute_dry_distance_to_highest_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, sizes: &LayoutSizes, ) -> Option<f64>

Dry layout equivalent of default_compute_distance_to_highest_actual_baseline. Internal to the flex layout.
Source§

fn compute_dry_distance_to_first_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, sizes: &LayoutSizes, ) -> Option<f64>

Dry layout equivalent of default_compute_distance_to_first_actual_baseline. Internal to the flex layout.
Source§

fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size

The size this flex would take, measuring the children dry.
Source§

fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Hit tests the children in paint order.
Source§

impl RenderObject for RenderFlex

Source§

fn render_object_data(self: RenderHandle<Self>, app: &App) -> &RenderObjectData

Mixin field access.
Source§

fn render_object_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectData

Source§

fn perform_layout(self: RenderHandle<Self>, app: &mut App)

Do the work of computing the layout for this render object. Read more
Source§

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

Calls visitor for each immediate child.
Source§

fn did_attach( self: RenderHandle<Self>, app: &mut App, owner: Handle<PipelineOwner>, )

The body of Flutter’s attach override after super.attach(owner); the base body has already run. The default attaches the children reported by visit_children.
Source§

fn did_detach(self: RenderHandle<Self>, app: &mut App)

The body of Flutter’s detach override after super.detach(). The default detaches the children reported by visit_children.
Source§

fn redepth_children(self: RenderHandle<Self>, app: &mut App)

Adjusts the depth of each child reported by visit_children.
Source§

fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )

Paint this render object into the given context at the given offset. Read more
Source§

fn dispose(self: RenderHandle<Self>, app: &mut App)

Release any resources held by this render object. Read more
Source§

fn as_render_object(self: RenderHandle<Self>, app: &App) -> AnyRenderObject

Dart’s implicit upcast of a concrete render object to RenderObject: this object’s type-erased handle, through the vtable the protocol recorded when it created it.
Source§

fn perform_resize(self: RenderHandle<Self>, _app: &mut App)

Updates the render object’s size using only the constraints. Read more
Source§

fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )

Sets up parent data for child if it has none. Read more
Source§

fn sized_by_parent(self: RenderHandle<Self>, _app: &App) -> bool

Whether the constraints are the only input to the sizing algorithm.
Source§

fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )

Applies the transform that would be applied when painting the given child to the given matrix. Read more
Source§

fn is_repaint_boundary(self: RenderHandle<Self>, _app: &App) -> bool

Whether this render object repaints separately from its parent. Read more
Source§

fn always_needs_compositing(self: RenderHandle<Self>, _app: &App) -> bool

Whether this render object always needs compositing. Read more
Source§

fn mouse_tracker_annotation( self: RenderHandle<Self>, _app: &App, ) -> Option<MouseTrackerAnnotation>

Dart’s this is MouseTrackerAnnotation: the annotation this render object implements, read live each time the mouse tracker consults it. None for a render object that is not an annotation, which is the default.
Source§

fn update_composited_layer( self: RenderHandle<Self>, app: &mut App, old_layer: Option<AnyOffsetLayer>, ) -> AnyOffsetLayer

Update the composited layer owned by this render object. Read more
Source§

fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )

Attempt to make (a portion of) this or a descendant RenderObject visible on screen. Read more
Source§

fn interface(self: RenderHandle<Self>, id: TypeId) -> Option<Box<dyn Any>>

Dart’s object is RenderAbstractViewport for any interface: the erased handle of the interface id names, if this type implements it. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ContainerRenderObjectBase for T

Source§

fn insert( self: RenderHandle<Self>, app: &mut App, child: Self::ChildType, after: Option<Self::ChildType>, )

Flutter’s ContainerRenderObjectMixin.insert.
Source§

fn remove(self: RenderHandle<Self>, app: &mut App, child: Self::ChildType)

Flutter’s ContainerRenderObjectMixin.remove.
Source§

fn remove_all(self: RenderHandle<Self>, app: &mut App)

Flutter’s ContainerRenderObjectMixin.removeAll.
Source§

fn move_child( self: RenderHandle<Self>, app: &mut App, child: Self::ChildType, after: Option<Self::ChildType>, )

Flutter’s ContainerRenderObjectMixin.move.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> RenderObjectBase for T
where T: RenderObject,

Source§

fn dispose(self: RenderHandle<Self>, app: &mut App)

Flutter’s RenderObject.dispose body: releases the layer handle. An override calls it last, where Dart writes super.dispose().
Source§

fn mark_needs_layout(self: RenderHandle<Self>, app: &mut App)

Flutter’s RenderObject.markNeedsLayout body; an override calls it where Dart writes super.markNeedsLayout().
Source§

fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )

Flutter’s RenderObject.showOnScreen.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>