RenderMetricsMsg class
Message sent periodically with renderer performance metrics.
When enabled via ProgramOptions.metricsInterval, the Program sends this message at the specified interval with current FPS, frame times, and render durations.
Example
@override
(Model, Cmd?) update(Msg msg) {
return switch (msg) {
RenderMetricsMsg(:final metrics) => (
copyWith(
fps: metrics.averageFps,
frameTime: metrics.averageFrameTime,
),
null,
),
_ => (this, null),
};
}
Constructors
- RenderMetricsMsg(RenderMetrics metrics)
-
Creates a render metrics message.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- metrics → RenderMetrics
-
The current render performance metrics.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited