filterMapKeys function

Map<String, dynamic> filterMapKeys(
  1. Map<String, dynamic> map
)

filter map keys includes $ #

Implementation

Map<String, dynamic> filterMapKeys(Map<String, dynamic> map) {
  final result = <String, dynamic>{};
  for (var item in map.entries) {
    if (item.key.contains('#')) continue;
    if (item.key.contains(r'$')) continue;
    result.putIfAbsent(item.key, () => item.value);
  }

  return result;
}