Skip to content

Commit

Permalink
refactor(example): debugPrint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jei-sKappa committed Oct 5, 2024
1 parent 1640c8f commit 58657aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Future<void> _createObjectsAndAddToQuadtree({
required QuadtreeController quadtreeController,
Offset? offset,
}) async {
print('Adding $count objects');
debugPrint('Adding $count objects');
final double qX = await quadtreeController.getX();
final double qY = await quadtreeController.getY();
final double qW = await quadtreeController.getWidth();
Expand Down Expand Up @@ -556,7 +556,7 @@ Future<void> _createObjectsAndAddToQuadtree({
objects.add(obj);
}
final valid = await quadtreeController.insertAllObjects(objects);
print('Added ${objects.length} objects');
debugPrint('Added ${objects.length} objects');
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
Expand Down
6 changes: 3 additions & 3 deletions example/lib/visualizer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class QuadtreePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final startTime = DateTime.now();
print('Repainting canvas $size at $startTime');
debugPrint('Repainting canvas $size at $startTime');

// Scale the quadtree to the screen size, preserving aspect ratio
final double scaleX = size.width / quadtree.width;
Expand Down Expand Up @@ -130,8 +130,8 @@ class QuadtreePainter extends CustomPainter {

final endTime = DateTime.now();
final duration = endTime.difference(startTime);
print(' Repaint duration: ${duration.inMilliseconds} ms');
print('-_' * 75);
debugPrint('Repaint duration: ${duration.inMilliseconds} ms');
debugPrint('-' * 75);
}

void _drawMultipleRootsQuadtree(
Expand Down

0 comments on commit 58657aa

Please sign in to comment.