Skip to content

Popping a route from the route itself #32

Answered by vanifatovvlad
Girildo asked this question in Q&A
Discussion options

You must be logged in to vote

You can send a command to close the route immediately after opening it:

Navigator.Push(context, ...);
Navigator.Pop(context);

An alternative solution is to move the asynchronous logic into a widget:

public override async void InitState()
{
  await this.photoCaptureService.TakePicture();
  Navigator.Pop(Context);
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Girildo
Comment options

Answer selected by Girildo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants