getOptional<T> method

  1. @override
List<T> getOptional<T>(
  1. dynamic locator
)

Gets all component references that match specified locator.

  • locator the locator to find references by. Returns a list with matching component references or empty list if nothing was found.

Implementation

@override
List<T> getOptional<T>(locator) {
  try {
    return find<T>(locator, false);
  } catch (ex) {
    return [];
  }
}