remove method
Removes a previously added reference that matches specified locator. If many references match the locator, it removes only the first one. When all references shall be removed, use removeAll method instead.
locator
a locator to remove reference Returns the removed component reference.
See removeAll
Implementation
@override
dynamic remove(locator) {
if (locator == null) return null;
for (var index = _references.length - 1; index >= 0; index--) {
var reference = _references[index];
if (reference.match(locator)) {
_references.removeAt(index);
return reference.getComponent();
}
}
return null;
}