DiagnosticsStackTrace constructor

DiagnosticsStackTrace(
  1. String name,
  2. StackTrace? stack, {
  3. IterableFilter<String>? stackFilter,
  4. bool showSeparator = true,
})

Creates a diagnostic for a stack trace.

name describes a name the stack trace is given, e.g. When the exception was thrown, this was the stack. stackFilter provides an optional filter to use to filter which frames are included. If no filter is specified, FlutterError.defaultStackFilter is used. showSeparator indicates whether to include a ':' after the name.

Implementation

DiagnosticsStackTrace(
  String name,
  StackTrace? stack, {
  IterableFilter<String>? stackFilter,
  super.showSeparator,
}) : super(
  name: name,
  value: stack,
  properties: _applyStackFilter(stack, stackFilter),
  style: DiagnosticsTreeStyle.flat,
  allowTruncate: true,
);