filterPackages function

Map<String, String> filterPackages (
  1. Map<String, dynamic> json
)

Implementation

Map<String, String> filterPackages(Map<String, dynamic> json) {
  final Map<String, String> pkgs = {};

  json.map((key, value) {
    if (value is String) {
      pkgs[key] = value;
    }
    return MapEntry(key, value);
  });

  return pkgs;
}