operator + method

  1. @override
BitList operator +(
  1. List<bool> 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
BitList operator +(List<bool> other) {
  final result = BitList(length + other.length);
  result.buffer.setRange(0, buffer.length, buffer);
  for (var i = 0; i < other.length; i++) {
    result.setUnchecked(length + i, other[i]);
  }
  return result;
}