Navigate to a new screen and back

5 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€92.23
List Price:  €129.13
You save:  €36.89
£78.59
List Price:  £110.03
You save:  £31.44
CA$137.16
List Price:  CA$192.03
You save:  CA$54.87
A$151.13
List Price:  A$211.59
You save:  A$60.45
S$135.01
List Price:  S$189.02
You save:  S$54.01
HK$781.20
List Price:  HK$1,093.71
You save:  HK$312.51
CHF 91.46
List Price:  CHF 128.06
You save:  CHF 36.59
NOK kr1,061.82
List Price:  NOK kr1,486.60
You save:  NOK kr424.77
DKK kr688.17
List Price:  DKK kr963.46
You save:  DKK kr275.29
NZ$163.63
List Price:  NZ$229.08
You save:  NZ$65.45
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.92
৳11,767.17
List Price:  ৳16,474.51
You save:  ৳4,707.34
₹8,311.31
List Price:  ₹11,636.17
You save:  ₹3,324.85
RM471.10
List Price:  RM659.56
You save:  RM188.46
₦144,985.50
List Price:  ₦202,985.50
You save:  ₦58,000
₨27,917.57
List Price:  ₨39,085.72
You save:  ₨11,168.14
฿3,668.07
List Price:  ฿5,135.45
You save:  ฿1,467.37
₺3,224.15
List Price:  ₺4,513.94
You save:  ₺1,289.79
B$514.41
List Price:  B$720.20
You save:  B$205.78
R1,838.28
List Price:  R2,573.67
You save:  R735.38
Лв180.40
List Price:  Лв252.56
You save:  Лв72.16
₩136,575.19
List Price:  ₩191,210.73
You save:  ₩54,635.53
₪367.08
List Price:  ₪513.93
You save:  ₪146.84
₱5,820.51
List Price:  ₱8,148.95
You save:  ₱2,328.44
¥15,696.33
List Price:  ¥21,975.49
You save:  ¥6,279.16
MX$1,669.55
List Price:  MX$2,337.44
You save:  MX$667.89
QR365.81
List Price:  QR512.15
You save:  QR146.33
P1,356.72
List Price:  P1,899.46
You save:  P542.74
KSh13,248.67
List Price:  KSh18,548.67
You save:  KSh5,300
E£4,714.66
List Price:  E£6,600.72
You save:  E£1,886.05
ብር5,763.61
List Price:  ብር8,069.29
You save:  ብር2,305.67
Kz85,036.79
List Price:  Kz119,054.91
You save:  Kz34,018.12
CLP$90,963.90
List Price:  CLP$127,353.10
You save:  CLP$36,389.20
CN¥710.91
List Price:  CN¥995.31
You save:  CN¥284.39
RD$5,896.64
List Price:  RD$8,255.53
You save:  RD$2,358.89
DA13,444.65
List Price:  DA18,823.05
You save:  DA5,378.39
FJ$226.74
List Price:  FJ$317.44
You save:  FJ$90.70
Q779.46
List Price:  Q1,091.28
You save:  Q311.81
GY$20,998.43
List Price:  GY$29,398.65
You save:  GY$8,400.21
ISK kr13,807.61
List Price:  ISK kr19,331.21
You save:  ISK kr5,523.60
DH997.80
List Price:  DH1,396.96
You save:  DH399.16
L1,773.82
List Price:  L2,483.42
You save:  L709.60
ден5,696.40
List Price:  ден7,975.18
You save:  ден2,278.78
MOP$806.77
List Price:  MOP$1,129.51
You save:  MOP$322.74
N$1,837.16
List Price:  N$2,572.10
You save:  N$734.94
C$3,692.45
List Price:  C$5,169.58
You save:  C$1,477.13
रु13,357.68
List Price:  रु18,701.28
You save:  रु5,343.60
S/374.42
List Price:  S/524.20
You save:  S/149.78
K389.87
List Price:  K545.83
You save:  K155.96
SAR375.02
List Price:  SAR525.05
You save:  SAR150.02
ZK2,655.84
List Price:  ZK3,718.29
You save:  ZK1,062.44
L458.72
List Price:  L642.23
You save:  L183.50
Kč2,280.96
List Price:  Kč3,193.44
You save:  Kč912.47
Ft35,528.88
List Price:  Ft49,741.85
You save:  Ft14,212.97
SEK kr1,070.73
List Price:  SEK kr1,499.06
You save:  SEK kr428.33
ARS$89,018.15
List Price:  ARS$124,628.98
You save:  ARS$35,610.82
Bs693.17
List Price:  Bs970.47
You save:  Bs277.29
COP$383,056.14
List Price:  COP$536,293.92
You save:  COP$153,237.77
₡51,437.31
List Price:  ₡72,014.29
You save:  ₡20,576.98
L2,479.18
List Price:  L3,470.95
You save:  L991.77
₲754,403.63
List Price:  ₲1,056,195.26
You save:  ₲301,791.63
$U3,847.90
List Price:  $U5,387.22
You save:  $U1,539.31
zł392.87
List Price:  zł550.04
You save:  zł157.16
Already have an account? Log In

Transcript

Hello, in this video, I am going to show you how to navigate to a new screen and back. So basically, navigation, we've got this one page right here, every page, if I click it doesn't do anything but we want this to go to a cover page to implement this. It's actually really simple. Now what we've got here which is in a paid when he's creating new work, so what we'll do is we are on the second page, and we'll say we need to explain status stateless widget in a separate video only describe the difference between a stateless widget and a stateful widget. So stay tuned for that. And then in here, need to have not covariant overload overload.

We have to override the widget builder context basically this one it auto filled it out for me which is fantastic and you probably want to build it in a similar fashion to this you can build out you want honestly if you keep in a similar fashion you just need that the design the flow this know the layout has a very similar feel. So I'm gonna pause the flow and I'm going to print out fine here so I'm gonna pull title and this is another Gordon center and then I love it show. A poorer number raise what And here is where we'll navigate so far. So this is where we will navigate back to the first page or to the child here. Go back oopsy Daisy, this needs to be inside the quarter. There we go.

So if I say that and clicking it doesn't do anything, because when we have this unpressed event, this is where we need to implement the code to essentially go to the next page. So the way you do this is the core novel. gave out the dot push. So we have a push and pop system. So it has a stack of pages or views or whatever it is to push on to the next one. The top most one is the one that you currently see in Chrome interact with pop, it removes them, we're going to cover that in a second.

So dot push context. Actually, sorry, this is a method so we just do context. And then next we need to essentially specify the next page and you do that by doing material page route. And then you put the build up. And for this context, the arrow operator for this is going to be second page. Open brackets, semi colon.

Yet you need another semi colon The neat one here, put in the wrong place, put reload. And now if I click it, as you can see, it goes to the next page, and it automatically puts a back arrow. So if I click that, as you can see, swipe up and down. So he provides a little nice, cool built in and he made sure so we can do that. So that's just built in, we haven't implemented this button. So let's implement this one to do this is extremely simple.

We want to have a manual event it could be a button or it could be something else. Something else is triggered and, you know, certain condition is met, he could go back to the previous page to do they really simple. You just put navigator dot pop context and whatever is below it in the stack, you'll go back to that. So if I click, go back, as you can see the go back button works So that's how you navigate to a page back from a page and you can create as many of these as you want. And in the next video, I'm going to show you how to actually separate this into a separate file. Because as you can imagine, this could get a P. That's it.

If you have any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.