captureDebugDumpApp function
Implementation
String captureDebugDumpApp() {
final previousDebugPrint = debugPrint;
final lines = <String>[];
debugPrint = (String? message, {int? wrapWidth}) {
if (message != null) {
lines.add(message);
}
};
try {
debugDumpApp();
} finally {
debugPrint = previousDebugPrint;
}
if (lines.isEmpty) {
return '<empty widget tree>';
}
return lines.join('\n');
}