getSetEntryInstance<T> function
Returns the instance that matches value
in set
.
Implementation
T? getSetEntryInstance<T>(Set<T>? set, T? value) {
if (set == null || value == null) return null;
if (!set.contains(value)) return null;
for (var elem in set) {
if (elem == value) {
return elem;
}
}
return null;
}