Calculator Part 3 - Tab Persistence

3 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, we are going to look at solving the problem that we had last time, which was if or you know, put something here and go to the next tackle something here. And if we go back, once we focus on another tab, the contents of all of the tabs get delete. And the reason for that is not manually going through the content and deleting it, essentially a reset. Cuz when we first create our application, we know we're doing this, we're creating, you know, we're calling the constructor. So when you actually switch tabs, deconstructed again called again, and one of the constructor being called again, all of this is being recreated. If you want to persist, it's actually really simple.

Just right here after we've done extends state addition tab, we will say with automatic keep alive client mixin. And again, era because we need to override the variable and the variable All we need to override is get one key alive. and the value we're going to say is true or not to keep you alive. And now we just need to add this to all of our other tabs. So if you don't want now tab persistence, then you don't need to not do any of this but most likely you will want it because otherwise it is pretty useless unless it's a static tab where you can't do anything. And we need to add this here and find the ID in the division tab.

There we go. So if I do a hot restart Okay, so symptom we started so if I go to here, typing mystifies eight and I do it, go to mode, and I'll go here, type it By the 40. As you can see, I'm still focused on here. The content for this tab still remains for going to here. And if I go to the different tabs, the content so that's how you do content persistence, we created our new tab bar application. As you can see, in three videos, we've done something pretty decent.

Obviously, the way you format it, you know, the widgets, you use the color scheme, that is totally up to you The aim of these free videos, this project was to show you how you know, you can have the default, no template that they give you. You can modify, you know, for example, a tab bar, integrate for other classes and files into it, and do tab persistence. If you have any questions, feel free to pop me a message or if you want to go over any of the videos that we've done previously together and you want to learn about the Indian Features again aflutter. Feel free to do that they're there for your perusal. If you have any questions, I look forward to hearing them and I also 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.