stackToString method

String stackToString({
  1. String indent = '',
})

Converts stack to a string using the FlutterError.defaultStackFilter logic.

Implementation

String stackToString({ String indent = '' }) {
  return indent + FlutterError.defaultStackFilter(
    stack.toString().trimRight().split('\n'),
  ).join('\n$indent');
}