init<V> method
Implementation
V init<V>(String key, V Function() init) {
final context = _context[_key] ??= {};
if (!context.containsKey(key)) {
context[key] = init();
}
final result = context[key];
return result as V;
}