Clean up debug logging

This commit is contained in:
stopflock
2025-12-07 15:09:31 -06:00
parent 405ec220d0
commit 7fb467872a
3 changed files with 4 additions and 27 deletions
-11
View File
@@ -4,13 +4,11 @@ import 'package:flutter/material.dart';
class MeasuredSheet extends StatefulWidget {
final Widget child;
final ValueChanged<double> onHeightChanged;
final String? debugLabel; // Add debug label for troubleshooting
const MeasuredSheet({
super.key,
required this.child,
required this.onHeightChanged,
this.debugLabel,
});
@override
@@ -34,17 +32,8 @@ class _MeasuredSheetState extends State<MeasuredSheet> {
final height = renderBox.size.height;
if (height != _lastHeight) {
_lastHeight = height;
// Add debug logging to help troubleshoot height measurement issues
if (widget.debugLabel != null) {
debugPrint('[MeasuredSheet-${widget.debugLabel}] Height changed: $_lastHeight -> $height');
}
widget.onHeightChanged(height);
}
} else {
// Add debug logging for measurement failures
if (widget.debugLabel != null) {
debugPrint('[MeasuredSheet-${widget.debugLabel}] Failed to measure height: renderBox is null');
}
}
}