hashList function Null safety
- @Deprecated('Use Object.hashAll() or Object.hashAllUnordered() instead. ' 'This feature was deprecated in v3.1.0-0.0.pre.897')
Combine the Object.hashCode values of an arbitrary number of objects from an Iterable into one value. This function will return the same value if given null as if given an empty list.
Deprecation
This function has been replaced by Object.hashAll, so that it can be used outside of Flutter as well. The new function is a drop-in replacement, except that the argument must not be null.
There is also a new function, Object.hashAllUnordered, which is similar but returns the same hash code regardless of the order of the elements in the provided iterable.
Implementation
@Deprecated(
'Use Object.hashAll() or Object.hashAllUnordered() instead. '
'This feature was deprecated in v3.1.0-0.0.pre.897'
)
int hashList(Iterable<Object?>? arguments) {
int result = 0;
if (arguments != null) {
for (final Object? argument in arguments) {
result = _Jenkins.combine(result, argument);
}
}
return _Jenkins.finish(result);
}