Open
Description
Correct me if I'm wrong... I don't think this is supported but this snippet in your docs implies that it is.
final builder = IocContainerBuilder()
..add((container) => DatabaseConnection('my-connection-string'))
..add<UserRepository>(
(container) => UserRepository(container<DatabaseConnection>()),
dispose: (userRepository) => userRepository.dispose(),
)
Based on the dispose extension, only scoped singletons are disposed. Therefore the dispose
function in the above example will never be called.
ioc_container/lib/ioc_container.dart
Lines 221 to 234 in 313e32d
Metadata
Metadata
Assignees
Labels
No labels