listenToReactiveValues method Null safety

void listenToReactiveValues(
  1. List reactiveValues
)

List to the values and react when there are any changes

Implementation

void listenToReactiveValues(List<dynamic> reactiveValues) {
  for (var reactiveValue in reactiveValues) {
    if (reactiveValue is ReactiveValue) {
      reactiveValue.values.listen((value) => notifyListeners());
    } else if (reactiveValue is ReactiveList) {
      reactiveValue.onChange.listen((event) => notifyListeners());
    } else if (reactiveValue is ChangeNotifier) {
      reactiveValue.addListener(notifyListeners);
    }
  }
}