4 minutes
Share the link to this page
You need to have access to the item to view this lesson.
One-time Fee
List Price:  $139.99
You save:  $40
List Price:  €129.16
You save:  €36.90
List Price:  £110.65
You save:  £31.61
List Price:  CA$190.98
You save:  CA$54.56
List Price:  A$210.43
You save:  A$60.12
List Price:  S$188.65
You save:  S$53.90
List Price:  HK$1,092.21
You save:  HK$312.08
CHF 90.94
List Price:  CHF 127.32
You save:  CHF 36.38
NOK kr1,073.42
List Price:  NOK kr1,502.83
You save:  NOK kr429.41
DKK kr688.34
List Price:  DKK kr963.70
You save:  DKK kr275.36
List Price:  NZ$229.30
You save:  NZ$65.51
List Price:  د.إ514.18
You save:  د.إ146.91
List Price:  ৳16,405.89
You save:  ৳4,687.73
List Price:  ₹11,669.86
You save:  ₹3,334.48
List Price:  RM656.20
You save:  RM187.50
List Price:  ₦212,084.85
You save:  ₦60,600
List Price:  ₨38,987.21
You save:  ₨11,140
List Price:  ฿5,080.23
You save:  ฿1,451.60
List Price:  ₺4,518.72
You save:  ₺1,291.15
List Price:  B$717.98
You save:  B$205.15
List Price:  R2,560.37
You save:  R731.58
List Price:  Лв252.50
You save:  Лв72.15
List Price:  ₩190,039.53
You save:  ₩54,300.88
List Price:  ₪519.88
You save:  ₪148.54
List Price:  ₱8,081.97
You save:  ₱2,309.29
List Price:  ¥21,816.27
You save:  ¥6,233.66
List Price:  MX$2,336.89
You save:  MX$667.73
List Price:  QR509.77
You save:  QR145.66
List Price:  P1,892.25
You save:  P540.68
List Price:  KSh18,338.69
You save:  KSh5,240
List Price:  E£6,566.87
You save:  E£1,876.38
List Price:  ብር8,018.62
You save:  ብር2,291.20
List Price:  Kz117,241.62
You save:  Kz33,500
List Price:  CLP$125,785.21
You save:  CLP$35,941.20
List Price:  CN¥1,011.72
You save:  CN¥289.08
List Price:  RD$8,204.83
You save:  RD$2,344.40
List Price:  DA18,834.58
You save:  DA5,381.69
List Price:  FJ$312.83
You save:  FJ$89.38
List Price:  Q1,088.43
You save:  Q311
List Price:  GY$29,329.21
You save:  GY$8,380.37
ISK kr13,866.61
List Price:  ISK kr19,413.81
You save:  ISK kr5,547.20
List Price:  DH1,393.74
You save:  DH398.24
List Price:  L2,477.05
You save:  L707.78
List Price:  ден7,943.71
You save:  ден2,269.79
List Price:  MOP$1,126.37
You save:  MOP$321.84
List Price:  N$2,552.71
You save:  N$729.40
List Price:  C$5,144.63
You save:  C$1,470
List Price:  रु18,717.65
You save:  रु5,348.28
List Price:  S/520.81
You save:  S/148.81
List Price:  K543.23
You save:  K155.22
List Price:  SAR525.02
You save:  SAR150.01
List Price:  ZK3,540.49
You save:  ZK1,011.64
List Price:  L642.66
You save:  L183.63
List Price:  Kč3,191.78
You save:  Kč912
List Price:  Ft50,060
You save:  Ft14,303.88
SEK kr1,076.37
List Price:  SEK kr1,506.96
You save:  SEK kr430.59
List Price:  ARS$124,064.98
You save:  ARS$35,449.67
List Price:  Bs968.19
You save:  Bs276.64
List Price:  COP$536,725.77
You save:  COP$153,361.17
List Price:  ₡71,713.44
You save:  ₡20,491.01
List Price:  L3,462.99
You save:  L989.49
List Price:  ₲1,051,200.66
You save:  ₲300,364.50
List Price:  $U5,416.34
You save:  $U1,547.63
List Price:  zł551.08
You save:  zł157.46
Already have an account? Log In


Hello, in this video, I am going to show you how to implement a Cupertino alert dialog. So an alert dialog, something that pops up takes the attention, the focus of everything else in the application is good to give the user some warning and error alert. Or if you really need to give them some information. And puberty, no one just wants to start in the iOS format. First of all, I'm going to create a trial. And this is going to be important that that will trigger the alert.

So you can trigger it however you want sample rate button. That's the alert button that I'm choosing to men. So raise but then I'm going to say child for the child text widget, it will say click me. And then I'm going to unpressed and here it could call a separate method. The code inside here is what is important to uniquely show dialog. for a second.

So in sha Allah, the semicolon at the end with the context is equal to the context it is just this right here. So this is anything we created. And then you need to do builder. And it's often called bracket build context. Recall this context. The arrow operator thing you say Cupertino, Cupertino dialogue, right that bracket in here.

We can set it up for a few basic properties. The one we want to do is title and the title text here, and I'm going to say and we're going to have content which will provide some more information. Say phones To talk to them again that morning once on my iPhone for the first time I saw it and it was on the eyes and some actions and these are buttons inside of the dialogue. You just do them Cupertino, dialogue, Cupertino dialogue action. And for this, there's a few different properties. The first one is default action so put to true so you know if basically you can trigger some sort of enter return command, that's what this will be and child text.

And obviously on press, we can have a specific can be text all I want you to experiment with the other properties. So this is kind of compressed and I'm going to say print saved up, will get this button that pops up here, click that we get an alert phone is too hot. And I thought click Buy and you were thinking nothing is happening. Why isn't it happening? And that is because we need to handle it in here. We do.

Navigator. Don't do the context. Don't talk. Now if we save it so if I click it, as you can see now, it disappears. So if you want it to disappear, you need to have this so this is closes like the current thing that the part of navigation tab currently has been, you know tied to the focus. So what I want you to do as an extra task is figure out or you know, click it to figure out how to add more button.

Basically you just duplicate the Cupertino dialogue action Aleksey, this is an array of widgets, duplicate this. And you can change the title. So we say something different on pressed functionality could be something different, but Popham that that's all there is to Cupertino alert dialog. If you have any question, feel free to drop me a message. And as usual, I look forward to seeing you in the next video.

Sign Up


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.