added null safety for llc
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/// Useful extension functions for [Map]
|
||||
extension MapX on Map {
|
||||
/// Returns a new map with null keys or values removed
|
||||
Map<String, dynamic> get nullProtected =>
|
||||
{...this}..removeWhere((key, value) => key == null || value == null);
|
||||
Map<String, dynamic> get nullProtected => {...this as Map<String, dynamic>}
|
||||
..removeWhere((key, value) => key == null || value == null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user