find<T> function
Implementation
T? find<T>(Map<String, T> container, String? id) {
if (id == null) return null;
final item = container[id];
if (item == null) {
final current = StackTrace.current
.toString()
.split("\n")
.take(5)
.map((frame) => "\t$frame")
.join("\n");
_log.warning("WARN: Item with id $id not found: $current");
}
return item;
}