setHeader method Null safety

Map setHeader(
  1. dynamic args
)

Updates header with the List of args and returns it

Implementation

Map setHeader(args) {
  for (int i = 0; i < args.length; i += 2) {
    if (args[i] is String && args[i + 1] is String) {
      header[args[i]] = args[i + 1];
    }
  }
  return header;
}