RiskDetectorConfig class
Configuration for runtime risk detection and optional static lint scanning.
All runtime detectors are debug-only. In release builds, error capture returns before registering global error hooks.
Constructors
- RiskDetectorConfig({bool detectOverflows = true, bool detectAsyncRisks = true, bool detectRebuilds = true, bool detectLintIssues = true, bool enableUiUpdateDetection = true, int uiUpdateThresholdSeconds = 2, String? lintScanDirectory, int rebuildWarningThreshold = 10, int rebuildStormThreshold = 20, int jankThresholdMs = 16})
-
Creates an immutable detector configuration.
const
Properties
- detectAsyncRisks → bool
-
Whether async-style Flutter errors should be classified and logged with
targeted suggestions.
final
- detectLintIssues → bool
-
Whether startup initialization should run the lint scan.
final
- detectOverflows → bool
-
Whether Flutter framework errors should be inspected for RenderFlex
overflow diagnostics.
final
- detectRebuilds → bool
-
Whether rebuild and jank tracking should be enabled.
final
- enableUiUpdateDetection → bool
-
Whether stale UI detection should be enabled.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- jankThresholdMs → int
-
Jank frame threshold in milliseconds. Defaults to 16ms (60fps).
final
- lintScanDirectory → String?
-
Directory scanned by the lint analyzer when detectLintIssues is true.
final
- rebuildStormThreshold → int
-
Rebuild count before storm is declared. Defaults to 20.
final
- rebuildWarningThreshold → int
-
Rebuild count before warnings start. Defaults to 10.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uiUpdateThresholdSeconds → int
-
Threshold in seconds used to evaluate whether a tracked state update should
have produced a rebuild.
final
Methods
-
copyWith(
{bool? detectOverflows, bool? detectAsyncRisks, bool? detectRebuilds, bool? detectLintIssues, bool? enableUiUpdateDetection, int? uiUpdateThresholdSeconds, String? lintScanDirectory, int? rebuildWarningThreshold, int? rebuildStormThreshold, int? jankThresholdMs}) → RiskDetectorConfig - Returns a copy with selected fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override