Skip to content

Commit b919c4f

Browse files
author
fbchen
committed
pptimize sort algorithm
1 parent 97617cc commit b919c4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/constraint_layout.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3399,7 +3399,7 @@ class _ConstraintRenderBox extends RenderBox
33993399
required Offset position,
34003400
}) {
34013401
if (_needsReorderEventOrder) {
3402-
_eventOrderList.sort((left, right) {
3402+
insertionSort<_ConstrainedNode>(_eventOrderList, (left, right) {
34033403
int result = left.eIndex - right.eIndex;
34043404
if (result == 0) {
34053405
result = left.index - right.index;
@@ -3474,7 +3474,7 @@ class _ConstraintRenderBox extends RenderBox
34743474
}());
34753475

34763476
if (_needsReorderPaintingOrder) {
3477-
_paintingOrderList.sort((left, right) {
3477+
insertionSort<_ConstrainedNode>(_paintingOrderList, (left, right) {
34783478
int result = left.zIndex - right.zIndex;
34793479
if (result == 0) {
34803480
result = left.index - right.index;

0 commit comments

Comments
 (0)