James Piner
James Piner

Reputation: 329

How to push data but not change the MaterialPageRoute in Flutter?

I want to stay on the same page that I'm in, but push some data to the next page, how can I achieve this?

Upvotes: 0

Views: 77

Answers (1)

Alexandre
Alexandre

Reputation: 142

From my experience with Flutter, the views are only built when you open them.

The next page is not initiated, so you should only push the data to the next page when you navigate to it.

You can do this by passing arguments to it, or use an external database (sql lite) or file.

Upvotes: 1

Related Questions