ListNotifier<T> constructor
Creates a new listenable List
data optional list that should be used as initial value
if notifyIfEqual is false ListNotifier will compare if a value
passed is equal to the existing value.
like list[5]=4 if the content at index 4 is equal to 4 and only call
notifyListeners if they are not equal. To prevent users from wondering
why their UI doesn't update if they haven't overritten the equality operator
the default is true.
Alternatively you can pass in a customEquality function that is then used instead
of ==
Implementation
ListNotifier({List<T>? data, bool notifyIfEqual = true, this.customEquality})
: _notifyIfEqual = notifyIfEqual,
super(data ?? []);