DebugOverlay constructor
DebugOverlay({
- Key? key,
- bool visible = false,
- bool? maintainState,
- int initialTabIndex = 0,
- double opacity = 0.9,
- DetectorBuilder? detectorBuilder,
- LogBucket? logBucket,
- HttpBucket? httpBucket,
- List<
Widget> debugEntries = const [], - List<
Widget> infoEntries = const [MediaQueryInfoEntry(), PackageInfoEntry(), DeviceInfoEntry(), if (!kIsWeb) PlatformInfoEntry()], - required Widget child,
Creates a DebugOverlay widget.
maintainState controls whether the overlay should maintain its state
while being invisible to the user, this allows for a quick resume
when toggling the overlay while inspecting something.
detectorBuilder allows the injection of a custom detector instead
of the default DebugDetector.
hiddenFields specifies a list of fields whose values are hidden
throughout the overlay.
Implementation
DebugOverlay({
super.key,
this.visible = false,
bool? maintainState,
this.initialTabIndex = 0,
this.opacity = 0.9,
DetectorBuilder? detectorBuilder,
List<String> hiddenFields = const [],
this.logBucket,
this.httpBucket,
this.debugEntries = const [],
this.infoEntries = const [
MediaQueryInfoEntry(),
PackageInfoEntry(),
DeviceInfoEntry(),
if (!kIsWeb) PlatformInfoEntry(),
],
required this.child,
}) : maintainState = maintainState ?? true,
detectorBuilder = detectorBuilder ?? _buildDetector,
hiddenFields = hiddenFields.map((e) => e.toLowerCase()).toList();