attach method

void attach(
  1. AppBarPosition position
)

Delegates the task of adding the appbar position to this controller to ensure it can be reliably detached and disposed later.

Implementation

void attach(AppBarPosition position) {
  assert(
    !_positions.contains(position),
    "Already attached in this controller.",
  );
  _positions.add(position..addListener(notifyListeners));
}