buildMetaContent function

String buildMetaContent(
  1. Map<String, String?> map
)

Builds a meta content from map.

Implementation

String buildMetaContent(Map<String, String?> map) {
  var content = '';

  for (var entry in map.entries) {
    var key = entry.key;
    var val = entry.value;

    if (content.isNotEmpty) {
      content += ', ';
    }

    if (val == null) {
      content += key;
    } else {
      content += '$key=$val';
    }
  }

  return content;
}