without method

Map<String, String> without(
  1. List<String> keys
)

Deletes keys and their values from this map and returns a new map without them.

Example:

final style = {'color': 'red', 'font-size': '10px', 'font-weight': 'bold'};
final withoutColorAndSize = style.except(['color', 'font-size']);
// returns: {'font-weight': 'bold'}

Implementation

Map<String, String> without(List<String> keys) {
  final map = Map<String, String>.of(this);
  for (final key in keys) map.remove(key);
  return map;
}