remove<T> static method
Removes specific object with given key
or by Type from ControlFactory.
When given key
is null, then key is T
- check ControlFactory.keyOf for more info.
If object of given key
is not found, then all instances of T
are removed.
Set dispose
to dispose removed object/s.
Returns number of removed items.
Implementation
static int remove<T>({dynamic key, bool dispose = false}) =>
factory.remove<T>(key: key, dispose: dispose);