DebugOverlayModel class final

Draggable render-metrics overlay for debugging TUI performance.

Intended to be composed by parent models:

  • feed it RenderMetricsMsg + WindowSizeMsg
  • call compose to overlay it above your main view
  • use toggle to show/hide (the caller decides which key)

Constructors

DebugOverlayModel({required bool enabled, required int terminalWidth, required int terminalHeight, required RenderMetrics? metrics, required int? panelX, required int? panelY, required bool dragging, required int dragOffsetX, required int dragOffsetY, int panelWidth = 40, int marginRight = 2, int marginTop = 0, int marginBottom = 2, String title = 'Render Metrics', String rendererLabel = 'UV'})
DebugOverlayModel.initial({bool enabled = false, int terminalWidth = 0, int terminalHeight = 0, String title = 'Render Metrics', String rendererLabel = 'UV', int panelWidth = 40, int marginRight = 2, int marginTop = 0, int marginBottom = 2})
factory

Properties

dragging bool
final
dragOffsetX int
final
dragOffsetY int
final
enabled bool
final
hashCode int
The hash code for this object.
no setterinherited
marginBottom int
final
marginRight int
final
marginTop int
final
metrics RenderMetrics?
final
panelWidth int
final
panelX int?
Stored top-left position. When null, uses default placement.
final
panelY int?
final
rendererLabel String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terminalHeight int
final
terminalWidth int
final
title String
final

Methods

compose(String base) String
Overlays the debug panel above base using direct string manipulation.
copyWith({bool? enabled, int? terminalWidth, int? terminalHeight, RenderMetrics? metrics, Object? panelX = _unset, Object? panelY = _unset, bool? dragging, int? dragOffsetX, int? dragOffsetY, int? panelWidth, int? marginRight, int? marginTop, int? marginBottom, String? title, String? rendererLabel}) DebugOverlayModel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
panel({int? terminalWidthOverride}) String
Renders just the debug panel (cached for performance).
setEnabled(bool v) DebugOverlayModel
toggle() DebugOverlayModel
toString() String
A string representation of this object.
inherited
update(Msg msg) → ({Cmd? cmd, bool consumed, DebugOverlayModel model})
Updates overlay state and reports whether the message was consumed.

Operators

operator ==(Object other) bool
The equality operator.
inherited