detach method

void detach(
  1. AppBarPosition position
)

Delegates the task of detaching and disposing of the appbar position to ensure consistency with attach function.

Implementation

void detach(AppBarPosition position) {
  assert(
    _positions.contains(position),
    "Already not attached in this controller.",
  );
  _positions.remove(position..removeListener(notifyListeners));
}