pushCreation method
Pushes a type onto the creation stack
Implementation
void pushCreation(Type type) {
if (_creationStack.contains(type) && !allowCircularDependencies) {
final cycle = [..._creationStack, type];
throw StateError(
'Circular dependency detected: ${cycle.join(' -> ')}',
);
}
_creationStack.add(type);
}