linked_layouts 0.5.4
linked_layouts: ^0.5.4 copied to clipboard
Create custom layout systems based on the multi-leader-multi-follower pattern.
0.5.4 #
-
Improved fallback
RenderBoxsize algorithm.- The resolver will attempt to access
constraintsand callgetDryLayout()if other methods fail. - When
constraints.isTightreturns true,getDryLayout()will not be called, resulting in returningconstraints.biggestearly. - This still doesn't guarantee a size will be resolved.
- The resolver will attempt to access
-
Actually fixed
RenderFractionalTranslationpaint transform not being applied even in the fallback callback.- This change introduces a manual static type check to handle
RenderFractionalTranslationspecifically, simulating itsapplyPaintTransform()call. - Custom fallback registry will be introduced in the future.
- Please mind that the system currently fails to update the transform properly if an inactive
RenderFractionalTranslation(e.g. in an inactive route) get resized - the size will not be updated, meaning the transform will remain the same until the render object becomes active again.
- This change introduces a manual static type check to handle
0.5.3 #
- Fixed fallback paint transform failing to apply because of method renames (stupid mistake).
- Complex usecases, such as
FractionTranslation(RenderFractionalTranslation) between leader and follower (e.g. in page routes), should now work properly again. - Please mind that fallback paint transform was never able to account for all usecases, such as using a
Transform(RenderTransform) widget with alignment applied, or any other render objects that attempt to accessRenderBox.sizeinRenderObject.applyPaintTransform()without modifyingRenderObject.parentDataof their child (children). This issue is unlikely to be solved in the near future.
- Complex usecases, such as
0.5.2 #
-
Added
LayoutLeaderClient.tryGetTransformIn()andLayoutLeaderClient.tryGetPositionIn().LayoutLink.getTransformIn()andLayoutLink.getOffsetIn()have been deprecated in favor of the new methods onLayoutLeaderClient. They will be removed in the0.6.0minor pre-release.
-
Deprecated
LayoutLeaderClient.scalegetter in favor ofLayoutLeaderClient.tryGetTransformIn()method.- Reverted
LayoutLeaderClient.scaleto use the oldRenderViewboundary logic, restoring behaviors broken in0.5.1. - The deprecated getter uses incorrect logic: attempts to get the leader's scale in global coordinate space.
- Migrating to
LayoutLeaderClient.tryGetTransformIn()is highly advised, because the replacement returns a full transform from the leader to the specified render object (e.g. follower), avoiding hacky workarounds (i.e.RenderViewboundaries). LayoutLeaderClient.scalewill be removed in the0.6.0minor pre-release.
- Reverted
-
Fixed
LayoutLeaderClient.sizesetter logic to handle detached render objects properly. -
Improved internal file structure.
0.5.1 #
-
Added
onClientDidLayout()method toLeaderLayoutLinkHandle.- Captures leader size and transform immediately upon completing layout.
-
Optimized
LayoutLink.getOffsetInmatrix calculations and tree traversals.- Implemented Lowest Common Ancestor (LCA) algorithm to find common parent nodes.
- Added fast-paths for parent-child layout relationships.
- Prunes upper-tree nodes above the LCA and avoids unnecessary matrix operations.
-
Optimized leader transform tracking and validation performance.
- Refactored leader validation logic into single-leader checks.
- Removed redundant computation overhead when verifying layout state across multi-leader setups.
-
Improved assertion efficiency in
SlottedMultiLeaderLayoutLink.leaderForSlot. -
Improved re-scheduling logic in
FrameCallbackScheduler. -
Improved changelog formatting.
0.5.0 #
-
Fixed internal update order of
RenderObjectWithOptionalLayoutLinkMixin.layoutLink,RenderObjectWithRequiredLayoutLinkMixin.layoutLink,RenderSlottedLayoutLeader.slot. -
Exposed public API
LeaderLayoutLinkHandleto enforce encapsulation ofdidLeaderDoPaintanddidLeaderDoLayoutofLayoutLink. Access to those methods is now provided viaLeaderLayoutLinkHandleinstance methods. -
Exposed public API
FollowerLayoutLinkHandleto encapsulate follower redepthing logic. Added atryRedepthClientmethod. -
Introduced a shared
RenderObjectWithLayoutLinkBaseMixininterface to makeRenderObjectWithRequiredLayoutLinkMixinindependant ofRenderObjectWithOptionalLayoutLinkMixin. -
Declared
LayoutLinkHandlefinal, andLayoutLink-baseto prevent incorrect implementations. -
Added more documentation comments.
-
Improved internal file structure.
0.4.0+1 #
-
Added a proper package description to
pubspec.yaml. -
Added placeholder package example.
0.4.0 #
-
Extracted client registration logic from
RenderLayout*MixinintoRenderObjectWith*LinkMixins. -
Added
RenderObjectWithOptionalLayoutLinkMixinand renamedRenderObjectWithLayoutLinkMixintoRenderObjectWithRequiredLayoutLinkMixin. -
Added optional named
schedulerBindingparameter toFrameCallbackSchedulerfor mocking purposes. -
Organized source file structure.
0.3.0 #
-
Fixed
RenderObjectmutation error when attempting to schedule layout run duringSchedulerPhase.persistentCallbacks. -
Optimized leader transforms and size checking.
-
Added more user-friendly error messages across the library.
-
Added registered leaders validation to
LayoutLink. -
Internal code cleanup and refactoring.
0.2.0 #
-
Fixed leader size not persisting across reattachments.
-
Introduced
RenderObjectWithLayoutLinkMixin.createLayoutClientInternalmethod to handle internal state. Implementers are expected to replacecreateLayoutClientwith the new method. -
Refactored
LayoutLeaderintoAbstractLayoutLeaderand introducedSingleLayoutLeaderandCustomLayoutLeaderas replacements. -
Renamed
LayoutLink.leaderOffsetIntoLayoutLink.getOffsetInand made the method static. -
Fixed
LayoutLeaderClient.scalewasn't DPI-aware. Now it looks for the nearestRenderViewancestor. -
Fixed
LayoutLinktransient frame callback was empty by mistake. -
Removed unnecessary assertions in
LayoutLinkHandle.
0.1.0 #
- Initial version.