FULTTER redirect to other page. RaisedButton & MaterialPageRoute.
-------------------------------
Code Link:- https://unpossiblepog.blogspot.com/20...
Download Project:-
https://unpossiblepog.com/codes/DART+...
Subscribe my Channel:- http://www.youtube.com/user/SanketRoo...
Facebook Page:- / unpossiblens
Twitter Account:- / unpossiblepog
Blog :- https://unpossiblepog.blogspot.in/
-------------------------------
Hey guys, in this video I shall add a button which will redirect to new page in flutter application.
I have created a new basic project. By default, it has a button which displays click count.
I provided a blog link which contains instructions and codes.
For first instruction, copy the code. In Flutter project, remove the default Center function if you have it.
Paste the code.
Then from second instruction, copy the code, and paste it inside Column function.
You can add 2 buttons, but make sure to add comma between them.
Anyway, currently I will be adding only one button.
As you can see, when I try to save it, it gives me an error.
It is because we currently don’t have insertPage() function.
Change button text if you want to.
Then, from the 3rd instruction, copy the whole code.
In Android Studio, create a new dart file in LIB folder.
Paste the code in it.
Now, we he have to import that newly created dart file inside our main.dart.
Go to the top, import the page. Make sure to give same name as you gave it to a newly created dart file, in my case it is newPage.dart.
Now, let’s check it on simulator.
When I click on a button, it will open a new page.
To go back, there is a back button automatically added.
So that is it, thanks for watching. Like share and subscribe.