convertToCallerString method

  1. @protected
String? convertToCallerString(
  1. Frame frame, {
  2. bool printFunctionName = true,
  3. bool printLocation = true,
})

Implementation

@protected
String? convertToCallerString(
  Frame frame, {
  bool printFunctionName = true,
  bool printLocation = true,
}) {
  if (!printFunctionName && !printLocation) {
    return null;
  }

  final parts = <String>[];
  if (printFunctionName) {
    final member = frame.member;
    if (member != null) {
      parts.add(member);
    }
  }
  if (printLocation) {
    parts.add('(${frame.locationEx})');
  }
  return parts.join(' ');
}