SimpleDialog

8 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.25
List Price:  €129.16
You save:  €36.90
£79.03
List Price:  £110.65
You save:  £31.61
CA$136.41
List Price:  CA$190.98
You save:  CA$54.56
A$150.30
List Price:  A$210.43
You save:  A$60.12
S$134.75
List Price:  S$188.65
You save:  S$53.90
HK$780.13
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
NZ$163.78
List Price:  NZ$229.30
You save:  NZ$65.51
د.إ367.26
List Price:  د.إ514.18
You save:  د.إ146.91
৳11,718.16
List Price:  ৳16,405.89
You save:  ৳4,687.73
₹8,335.38
List Price:  ₹11,669.86
You save:  ₹3,334.48
RM468.70
List Price:  RM656.20
You save:  RM187.50
₦151,484.85
List Price:  ₦212,084.85
You save:  ₦60,600
₨27,847.21
List Price:  ₨38,987.21
You save:  ₨11,140
฿3,628.63
List Price:  ฿5,080.23
You save:  ฿1,451.60
₺3,227.56
List Price:  ₺4,518.72
You save:  ₺1,291.15
B$512.82
List Price:  B$717.98
You save:  B$205.15
R1,828.78
List Price:  R2,560.37
You save:  R731.58
Лв180.35
List Price:  Лв252.50
You save:  Лв72.15
₩135,738.64
List Price:  ₩190,039.53
You save:  ₩54,300.88
₪371.33
List Price:  ₪519.88
You save:  ₪148.54
₱5,772.67
List Price:  ₱8,081.97
You save:  ₱2,309.29
¥15,582.60
List Price:  ¥21,816.27
You save:  ¥6,233.66
MX$1,669.16
List Price:  MX$2,336.89
You save:  MX$667.73
QR364.11
List Price:  QR509.77
You save:  QR145.66
P1,351.57
List Price:  P1,892.25
You save:  P540.68
KSh13,098.69
List Price:  KSh18,338.69
You save:  KSh5,240
E£4,690.49
List Price:  E£6,566.87
You save:  E£1,876.38
ብር5,727.42
List Price:  ብር8,018.62
You save:  ብር2,291.20
Kz83,741.62
List Price:  Kz117,241.62
You save:  Kz33,500
CLP$89,844.01
List Price:  CLP$125,785.21
You save:  CLP$35,941.20
CN¥722.63
List Price:  CN¥1,011.72
You save:  CN¥289.08
RD$5,860.43
List Price:  RD$8,204.83
You save:  RD$2,344.40
DA13,452.89
List Price:  DA18,834.58
You save:  DA5,381.69
FJ$223.44
List Price:  FJ$312.83
You save:  FJ$89.38
Q777.42
List Price:  Q1,088.43
You save:  Q311
GY$20,948.83
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
DH995.50
List Price:  DH1,393.74
You save:  DH398.24
L1,769.27
List Price:  L2,477.05
You save:  L707.78
ден5,673.92
List Price:  ден7,943.71
You save:  ден2,269.79
MOP$804.52
List Price:  MOP$1,126.37
You save:  MOP$321.84
N$1,823.31
List Price:  N$2,552.71
You save:  N$729.40
C$3,674.63
List Price:  C$5,144.63
You save:  C$1,470
रु13,369.37
List Price:  रु18,717.65
You save:  रु5,348.28
S/371.99
List Price:  S/520.81
You save:  S/148.81
K388.01
List Price:  K543.23
You save:  K155.22
SAR375
List Price:  SAR525.02
You save:  SAR150.01
ZK2,528.85
List Price:  ZK3,540.49
You save:  ZK1,011.64
L459.03
List Price:  L642.66
You save:  L183.63
Kč2,279.78
List Price:  Kč3,191.78
You save:  Kč912
Ft35,756.12
List Price:  Ft50,060
You save:  Ft14,303.88
SEK kr1,076.37
List Price:  SEK kr1,506.96
You save:  SEK kr430.59
ARS$88,615.31
List Price:  ARS$124,064.98
You save:  ARS$35,449.67
Bs691.54
List Price:  Bs968.19
You save:  Bs276.64
COP$383,364.60
List Price:  COP$536,725.77
You save:  COP$153,361.17
₡51,222.42
List Price:  ₡71,713.44
You save:  ₡20,491.01
L2,473.49
List Price:  L3,462.99
You save:  L989.49
₲750,836.16
List Price:  ₲1,051,200.66
You save:  ₲300,364.50
$U3,868.71
List Price:  $U5,416.34
You save:  $U1,547.63
zł393.61
List Price:  zł551.08
You save:  zł157.46
Already have an account? Log In

Transcript

Hello, in this video, I am going to show you how to implement a simple dialogue. And I don't mean the simple dialogue, the dialogue will be simple, simple dialogue is an actual class of built into flutter. Basically something that pops up, give you a title give you a few options, you can select them. And it's you know, very simple customization very minimal. It's a great way of, you know, giving the user some extra options, and potentially could be maybe, maybe the you exit in somewhere that will pop up and saying, you know, save, save, save next, as you say, will continue to execute that said not after, so we'll be good for that. So first of all, what we want to do is as our class, we're going to create an image.

If you don't know what even though I recommend that you go and check out that video and the ino console in Korea, I'm gonna allowed to me so a lot of companies are actually at the mall with this week's man today in the UK and welcome corner. Oh yeah, she's done in. Okay, so not as many as you want the more options, the more options you can potentially have in your future and orient, and Wisconsin, open vial of what we're going to call this method that will initiate the synthol you can call it whatever you want. open bracket async is going to be asynchronous curly braces. And again, if you don't know which then feel free to go and have a look at my dot CSV, and check out that part. Well, if you need any help, you know, we can await show dialog.

And this will be fortunate in context. This is going to be digital context as you know, pass through. And this is basically where the magic happens. This is where we're going to be customizing our build context. content and in here, we are going to return in the center dog houses and property along here to get your total count and do this The charges are also in which this is a select board isn't just, you know, this isn't capable of telling you what to add our children and can be an array of widgets, and we're going to add simple dialogue options in via video to properties, you can easily do it on press and file. So let's first have a look.

So in the unpressed you can obviously call a normal method console log method right here. We're gonna say navigator, dot pop that basically means close was currently open dialog, which is the context for needle and what that means More in the rocket there, there you go. Okay. Yet follow method and this is basically going to return the wave that represents and we'll handle that very slowly the Nova switch statement but bear with me and we're going to do the skeleton the simple dollar add a child, this child how do you that was collected marble so now you just add in those simple dollar box you can have many choices to sign Have the tech speak up tomorrow? What do we need to do? We Yeah, we're all done in this call, we can go right here.

After the double brackets before the closing curly brace, we need to add a brace. And now you see the error disappeared. This is what's going to thank you that's so good once we close down a simple dollar option by selecting one of the options, and we can handle the case. This is a switch statement. So usually the switch statement will be switching on something really simple like a variable instead is switching on the dollar option and more importantly, what you slept on in that. So as you can see is very, very complex.

It's been missing movies.com So this takes you back to Captain Marvel. All right, I'm pulled up what you can put whatever code here you want, you could initiate method that essentially plays the movie or whatever you want to say. Model selectors. And then you could add any other cases that you have got one. Right. And if you were to say that along congruent can we need a something like a button to have invented it to be able to initiate this dialogue that's really simple about everybody.

Not any sort of, you know, gesture input channel, icon button, very simple button to add an icon and the icon on the left Yep, oh and we are also going to need the on press event open dialog and now if he was to reload it so we get that click it we get this stuff all you know connect to the printer or select Captain Marvel says Captain all selected for goes to again select Captain Marvel Captain Marvel only selected for the illustrations and this time it says she's been selected. And that's really simple dialogue which classes he needs. These are the things that you will need to modify, you know for yourself once you get this code in this email. Obviously more Movies are multiple options if you have more options, some more simple dialogue options and you can have a compress. You can have extra functionality here, which is long you just want this and the rest is handled here based on the particular option.

So nothing is simple. If you have any questions for me message analysts 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.