TestingLibraryElementError.fromJs constructor Null safety
- dynamic jsError,
- [StackTrace? jsStackTrace]
Implementation
factory TestingLibraryElementError.fromJs(/*JsError*/ dynamic jsError, [StackTrace? jsStackTrace]) {
StackTrace? stack;
if (jsError is JsError) {
final jsErrorStack = jsError.stack;
stack = jsStackTrace ?? (jsErrorStack != null ? StackTrace.fromString(jsErrorStack) : null);
}
return TestingLibraryElementError(jsError.toString(), stack);
}