tryGetSet<T> method

Set<T>? tryGetSet<T>(
  1. int index, {
  2. List<int>? alternativeIndices,
  3. dynamic innerMapKey,
  4. int? innerIndex,
  5. Set<T>? defaultValue,
  6. ElementConverter<T>? elementConverter,
})

Tries to convert the element at index (or fallback indices) to a Set of T.

Implementation

Set<T>? tryGetSet<T>(
  int index, {
  List<int>? alternativeIndices,
  dynamic innerMapKey,
  int? innerIndex,
  Set<T>? defaultValue,
  ElementConverter<T>? elementConverter,
}) => ConvertObjectImpl.tryToSet<T>(
  _firstForIndices(index, alternativeIndices: alternativeIndices),
  mapKey: innerMapKey,
  listIndex: innerIndex,
  defaultValue: defaultValue,
  elementConverter: elementConverter,
  debugInfo: {
    'index': index,
    if (alternativeIndices != null && alternativeIndices.isNotEmpty)
      'altIndexes': alternativeIndices,
  },
);