UniqueList<E> constructor

UniqueList<E>({
  1. bool strict = false,
  2. bool nullable = true,
  3. bool growable = true,
})

Constructs a new UniqueList.

If strict is true, a DuplicateValueError will be thrown when a value is added to the list that already exists in the list.

If nullable is true, the list may contain multiple instances of null, otherwise, null will be treated like any other value and only one instance of null may be contained in the list.

Implementation

UniqueList({
  bool strict = false,
  bool nullable = true,
  bool growable = true,
})  : nullable = false,
      strict = false,
      super(<E>[], growable: growable);