Ioc class

The Container package is one of the core components of the Mineral framework, in fact it registers the entire application through its IOC.

Constructors

Ioc()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services Map<String, dynamic>
no setter

Methods

bind<T>({required String namespace, required T service}) → void
Registers a new service within the IOC. class MyService {}
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String namespace) → void
Deletes a service registered in the /// ```dart ioc.remove('Mineral/Services/MyService');
singleton<T extends dynamic>(String namespace) → T
Resolve the service instance from its namespace /// ```dart final myService = ioc.singleton('Mineral/Services/MyService'); final myService = ioc.singleton
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init() Ioc