formatScreenTrace static method

String formatScreenTrace(
  1. ScreenDebugInfo info
)

Formats the screen debug trace into a readable multi-line string.

Implementation

static String formatScreenTrace(ScreenDebugInfo info) {
  final StringBuffer buffer = StringBuffer()
    ..writeln('[NativeLens] Screen Debug')
    ..writeln('Screen: ${info.screenName}')
    ..writeln('File: ${info.filePath}')
    ..writeln('Route: ${info.routeName}');

  if (info.extra != null && info.extra!.isNotEmpty) {
    buffer.writeln('Extra: ${info.extra}');
  }

  return buffer.toString().trimRight();
}