CustomPerformanceOverlay class
Widget that shows a performance overlay based on the FrameTiming API.
This is like the PerformanceOverlay from the framework, however, this is supported on all platforms while the framework PerformanceOverlay is not supported on Flutter web. Furthermore, the way the information is displayed in this overlay closely resembles the data available via the FrameTiming API and is opinionated differently than the native PerformanceOverlay.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CustomPerformanceOverlay
Constructors
- CustomPerformanceOverlay({Key? key, bool enabled = true, Alignment alignment = Alignment.topRight, double scale = 1, int sampleSize = 32, Duration targetFrameTime = const Duration(milliseconds: 16), Duration barRangeMax = const Duration(milliseconds: 24), Color backgroundColor = Colors.white, Color textColor = Colors.black, Color textBackgroundColor = const Color(0x77ffffff), Color uiColor = Colors.teal, Color rasterColor = Colors.blue, Color highLatencyColor = Colors.cyan, required Widget child})
-
Creates a CustomPerformanceOverlay widget wrapped around the given
child
widget.const
Properties
- alignment → Alignment
-
Alignment of the whole overlay.
final
- backgroundColor → Color
-
Color that is used for the background of the individual charts.
final
- barRangeMax → Duration
-
The max value of the visible range of the bar chart.
final
- child → Widget
-
The widget below this widget in the tree.
final
- enabled → bool
-
Whether the custom performance overlay should be enabled or not.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highLatencyColor → Color
-
Color that is used for indicating high latency times.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- rasterColor → Color
-
Color that is used for indicating raster times.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleSize → int
-
How many frame timings will be stored for extrapolating the FPS and
showing the bar chart.
final
- scale → double
-
The value the overlay is scaled by.
final
- targetFrameTime → Duration
-
The target time for every single frame.
final
- textBackgroundColor → Color
-
Color that is used as the background color for all text.
final
- textColor → Color
-
Color that is used for all text displaying stats.
final
- uiColor → Color
-
Color that is used for indicating UI times.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited