current property
StackTrace currentReturns a representation of the current stack trace.
This is similar to what can be achieved by doing:
try { throw 0; } catch (_, stack) { return stack; }
The getter achieves this without throwing, except on platforms that have no other way to get a stack trace.
Source
external static StackTrace get current;
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-core/StackTrace/current.html