operator + method Null safety

  1. @override
List<T> operator +(
  1. List<T> other
)
override

Returns the concatenation of this list and other.

Returns a new list containing the elements of this list followed by the elements of other.

The default behavior is to return a normal growable list. Some list types may choose to return a list of the same type as themselves (see Uint8List.+);

Implementation

@override
List<T> operator +(List<T> other) {
  _context.enforceReadPolicy(_atom);

  final newList = _list + other;
  _atom.reportObserved();
  return newList;
}