note static method

void note({
  1. required bool named,
  2. int unnamedDepth = 0,
})

Record the page now on top: named when it has a route name; unnamedDepth counts the unnamed pages stacked above the last named one.

Implementation

static void note({required bool named, int unnamedDepth = 0}) {
  _unnamed = !named;
  _unnamedDepth = named ? 0 : (unnamedDepth < 1 ? 1 : unnamedDepth);
}