logRequest function

void logRequest (
  1. String appName,
  2. String className,
  3. String type,
  4. String uri,
  5. String body
)

Implementation

void logRequest(
    String appName, String className, String type, String uri, String body) {
  String requestString = ' \n';
  String name = appName;
  if (name.isNotEmpty) {
    name = '$appName ';
  }
  requestString += '----\n${name}API Request ($className : $type) :';
  requestString += '\nUri: $uri';
  requestString += '\nBody: $body';

  requestString += '\n----\n';
  print(requestString);
}