getTypeOrNull<T> method

T? getTypeOrNull<T>()

Implementation

T? getTypeOrNull<T>() {
  try {
    return _values.singleWhere((element) => element is T);
  } catch (e) {
    return null;
  }
}