stacktrace property Null safety

String? stacktrace
final

Native stacktrace for the error, possibly null.

This contains the native platform stack trace, not the Dart stack trace.

The stack trace for Dart exceptions can be obtained using try-catch blocks, for example:

try {
  ...
} catch (e, stacktrace) {
  print(stacktrace);
}

Implementation

final String? stacktrace;