synchronizeWith method

void synchronizeWith(
  1. int source,
  2. int target
)

Synchronizes so that when the appbar corresponding to the first argument (index) is updated, the app bar corresponding to the second argument (index) is also updated.

Implementation

void synchronizeWith(int source, int target) {
  assert(positionOf(source) != null);
  assert(positionOf(target) != null);
  positionOf(source)?.addListener(positionOf(target)!.notifyListeners);
}