Files
stream-chat-flutter/packages/stream_chat/lib/src/extensions/map_extension.dart
T

7 lines
250 B
Dart

/// Useful extension functions for [Map]
extension MapX<K, V> on Map<K, V> {
/// Returns a new map with null keys or values removed
Map<K, V> get nullProtected =>
Map.from(this)..removeWhere((key, value) => key == null || value == null);
}