pushAfterFirst method

void pushAfterFirst(
  1. Widget screen, {
  2. bool transparent = false,
  3. bool isCupertino = false,
})

Replace the all route of the navigator by pushing the given route and then disposing all the previous route.

Implementation

void pushAfterFirst(
  Widget screen, {
  bool transparent = false,
  bool isCupertino = false,
}) {
  popToFirst();
  push(
    screen,
    transparent: transparent,
    isCupertino: isCupertino,
  );
}