getStack method Null safety

Future<Stack> getStack(
  1. String isolateId,
  2. {int? limit}
)

The getStack RPC is used to retrieve the current execution stack and message queue for an isolate. The isolate does not need to be paused.

If limit is provided, up to limit frames from the top of the stack will be returned. If the stack depth is smaller than limit the entire stack is returned. Note: this limit also applies to the asyncCausalFrames and awaiterFrames stack representations in the Stack response.

If isolateId refers to an isolate which has exited, then the Collected Sentinel is returned.

See Stack.

This method will throw a SentinelException in the case a Sentinel is returned.

Implementation

Future<Stack> getStack(String isolateId, {int? limit});