isInList<T> method

bool isInList<T>(
  1. List<T> list
)

Check if the object is in a list

Example: object.isInList([1, 2, 3]) // true

Implementation

bool isInList<T>(List<T> list) => list.contains(this);