@@ -49,13 +49,8 @@ extension type QuadTree$QueryResult._(Float32List _bytes) {
4949 /// The walk stops when it iterates over all objects or
5050 /// when the callback returns false.
5151 void forEach (
52- bool Function (
53- int id,
54- double left,
55- double top,
56- double width,
57- double height,
58- ) cb,
52+ bool Function (int id, double left, double top, double width, double height)
53+ cb,
5954 ) {
6055 if (isEmpty) return ;
6156 final ids = Uint32List .sublistView (_bytes);
@@ -183,14 +178,13 @@ final class QuadTree {
183178 required Float32List objects,
184179 required Uint32List recycledIds,
185180 required Uint32List id2node,
186- }) :
187- // Nodes
188- _nodes = nodes,
189- _recycledNodes = recycledNodes,
190- // Objects
191- _objects = objects,
192- _recycledIds = recycledIds,
193- _id2node = id2node;
181+ }) : // Nodes
182+ _nodes = nodes,
183+ _recycledNodes = recycledNodes,
184+ // Objects
185+ _objects = objects,
186+ _recycledIds = recycledIds,
187+ _id2node = id2node;
194188
195189 // --------------------------------------------------------------------------
196190 // PROPERTIES
@@ -290,10 +284,7 @@ final class QuadTree {
290284
291285 // Get the root node of the QuadTree
292286 // or create a new one if it does not exist.
293- final root = _root ?? = _createNode (
294- parent: null ,
295- boundary: boundary,
296- );
287+ final root = _root ?? = _createNode (parent: null , boundary: boundary);
297288
298289 // Create a new object in the QuadTree.
299290 final objectId = _getNextObjectId ();
@@ -434,10 +425,7 @@ final class QuadTree {
434425
435426 // Resize recycled ids array if needed
436427 if (_recycledIdsCount == _recycledIds.length)
437- _recycledIds = _resizeUint32List (
438- _recycledIds,
439- _recycledIds.length << 1 ,
440- );
428+ _recycledIds = _resizeUint32List (_recycledIds, _recycledIds.length << 1 );
441429 _recycledIds[_recycledIdsCount++ ] = objectId;
442430
443431 return true ;
@@ -452,13 +440,8 @@ final class QuadTree {
452440 /// The walk stops when it iterates over all objects or
453441 /// when the callback returns false.
454442 void forEach (
455- bool Function (
456- int id,
457- double left,
458- double top,
459- double width,
460- double height,
461- ) cb,
443+ bool Function (int id, double left, double top, double width, double height)
444+ cb,
462445 ) {
463446 final root = _root;
464447 if (root == null ) return ;
@@ -1013,7 +996,8 @@ final class QuadTree {
1013996 // --------------------------------------------------------------------------
1014997
1015998 @override
1016- String toString () => 'QuadTree{'
999+ String toString () =>
1000+ 'QuadTree{'
10171001 'nodes: $nodes , '
10181002 'objects: $length '
10191003 '}' ;
@@ -1137,13 +1121,8 @@ final class QuadTree$Node {
11371121 /// when the callback returns false.
11381122 @pragma ('vm:prefer-inline' )
11391123 void forEach (
1140- bool Function (
1141- int id,
1142- double left,
1143- double top,
1144- double width,
1145- double height,
1146- ) cb,
1124+ bool Function (int id, double left, double top, double width, double height)
1125+ cb,
11471126 ) {
11481127 if (isEmpty) return ;
11491128 if (subdivided) {
@@ -1184,12 +1163,7 @@ final class QuadTree$Node {
11841163 final top = boundary.top;
11851164 final nw = _northWest = tree._createNode (
11861165 parent: this ,
1187- boundary: ui.Rect .fromLTWH (
1188- left,
1189- top,
1190- halfWidth,
1191- halfHeight,
1192- ),
1166+ boundary: ui.Rect .fromLTWH (left, top, halfWidth, halfHeight),
11931167 ),
11941168 ne = _northEast = tree._createNode (
11951169 parent: this ,
@@ -1327,7 +1301,8 @@ final class QuadTree$Node {
13271301 identical (this , other) || other is QuadTree$Node && id == other.id;
13281302
13291303 @override
1330- String toString () => r'QuadTree$Node{'
1304+ String toString () =>
1305+ r'QuadTree$Node{'
13311306 'id: $id , '
13321307 'objects: $length , '
13331308 'subdivided: $_subdivided '
0 commit comments