processResultToDebugString function Null safety

String processResultToDebugString(
  1. ProcessResult result
)

Implementation

String processResultToDebugString(ProcessResult result) {
  final sb = StringBuffer();
  sb.writeln('exitCode: ${result.exitCode}');
  if (_isNotEmpty(result.stdout)) {
    sb.writeln('out: ${result.stdout}');
  }
  if (_isNotEmpty(result.stderr)) {
    sb.writeln('err: ${result.stderr}');
  }
  return sb.toString();
}