contains method
Tests whether a property exists or not. This can be less expensive than value(forKey:), because it does not have to allocate an object for the property value.
- Parameter key: The key.
- Returns: True of the property exists, otherwise false.
Implementation
bool contains(String key) {
if (_data != null && _data.isNotEmpty && _data.containsKey(key)) {
return true;
} else {
return false;
}
}