getWhere static method

APIRoot? getWhere(
  1. bool matcher(
    1. APIRoot apiRoot
    ), {
  2. bool lastAsDefault = false,
})

Returns the first APIRoot matched by matcher.

Implementation

static APIRoot? getWhere(bool Function(APIRoot apiRoot) matcher,
        {bool lastAsDefault = false}) =>
    _instances.values.firstWhereOrNull(matcher) ??
    (lastAsDefault ? get(singleton: false) : null);