toString method

  1. @override
String toString ({bool debugIncludeStack: false })
override

Returns a string representation of this object.

Implementation

@override
String toString({ bool debugIncludeStack = false }) {
  final StringBuffer buffer = StringBuffer();
  buffer.write('$runtimeType(');
  assert(() {
    buffer.write(debugLabel ?? '');
    return true;
  }());
  buffer.write(')');
  assert(() {
    if (debugIncludeStack) {
      buffer.writeln();
      buffer.writeln('The stack trace when the $runtimeType was actually created was:');
      FlutterError.defaultStackFilter(_debugCreationStack.toString().trimRight().split('\n')).forEach(buffer.writeln);
    }
    return true;
  }());
  return buffer.toString();
}