StackTraceParser class

Parser for extracting useful information from stack traces.

Annotations
  • @experimental
  • @immutable

Constructors

StackTraceParser({List<String> ignorePackages = const [], FrameFilter? customFilter, bool includeAsyncOrigin = false, SymbolResolver? symbolResolver})
Creates a StackTraceParser with optional ignored packages and filter.
const

Properties

customFilter FrameFilter?
Optional custom filter function to decide if a frame should be ignored.
final
hashCode int
The hash code for this object.
no setteroverride
ignorePackages List<String>
List of package prefixes to ignore during parsing (e.g., 'logd' to skip internals).
final
includeAsyncOrigin bool
Whether to include asynchronous suspension lines as frames.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbolResolver SymbolResolver?
Optional callback to resolve or deobfuscate method/symbol names.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse({required StackTrace stackTrace, int skipFrames = 0, int maxFrames = 0}) → StackFrameSet
Parses a stack trace in a single pass, extracting both the caller (first non-ignored frame) and up to maxFrames stack frames.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

clearSourceMaps() → void
Clears the registered source maps registry.
registerSourceMap(String jsFilePathOrUrl, String sourceMapJson) → void
Registers a parsed source map for a given JavaScript file URL or path.