obsList<T> method

RxList<T> obsList<T>([
  1. List<T>? initialValue
])

Create and auto-track a reactive list - PREVENTS MEMORY LEAKS

Implementation

RxList<T> obsList<T>([List<T>? initialValue]) {
  if (_disposed) {
    throw StateError('Cannot create reactive list on disposed controller');
  }

  final rxList = RxList<T>(initialValue ?? <T>[]);
  _trackReactiveObject(rxList);
  return rxList;
}