call method
Returns the Frame for the current code location, skipping the initial stack levels specified by level.
Returns None if no suitable frame is found, or if the host platform
(notably dart2wasm) cannot parse its own stack-trace format.
Implementation
Option<Frame> call() {
try {
final frames = Trace.current(level).frames;
for (var n = 0; n < frames.length; n++) {
final frame = frames[n];
final lineNumber = frame.line;
final columnNumber = frame.column;
if (lineNumber != null && columnNumber != null) {
return Some(frame);
}
}
} catch (_) {
// dart2wasm trips a host-level trap inside `path.Style.platform` when
// touching frames. Treat that as "no frame available" rather than
// crashing the isolate — `Here` is a debug-only utility.
}
return const None();
}