AlertDialog (Flutter Widget of the Week)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
♪ (intro music) ♪ Does your app have a critical junction where users need to make an important decision? Do you want to alert someone about something or maybe get their input? Try using an <i>AlertDialog.</i> Depending on your preferred design, you can either use an <i>AlertDialog</i> for Material or <i>CupertinoAlertDialog</i> for iOS. At their most basic, dialogs are pop-ups with some content and some buttons. Right up top is the <i>title</i> followed by the main <i>content.</i> Usually, this is text, but it could also be an animated image or anything you want. It should be clear to users what to do about the alert, so specify how they can respond to it with buttons past to the <i>actions</i> parameter. If you're in a Material world, <i>AlertDialog</i> gives you additional properties. Like a card, you can change the <i>elevation</i> of the dialog, as well as the <i>background color.</i> And if you really want to get fancy, you can modify the shape of your dialog with a <i>shape</i> parameter. <i>CupertinoAlertDialog</i> and <i>AlertDialog</i> pair with helper methods <i>showCupertinoDialog</i> and <i>showDialog</i> respectively to actually, well, show the dialogs. <i>ShowDialog</i> takes a <i>context</i> and a <i>builder</i> that returns the specific dialog you want to appear. You then tell it whether or not the user can tap outside of it to dismiss. And that's it. <i>ShowDialog</i> and <i>AlertDialog</i> implement a Material way of doing dialogs. <i>CupertinoAlertDialog</i> and <i>ShowCupertionoDialog</i> take many of the same parameters and render for iOS. For more on <i>AlertDialogs</i> and all the other Flutter widgets, head on over to <i>flutter.dev</i> ♪ (music) ♪
Info
Channel: Flutter
Views: 228,226
Rating: undefined out of 5
Keywords: AlertDialog, alert your users, show information app, show dialog, app dialog, dialog screen, flutter dialog, build an app, app building, coding, widgets, create a widget, widgets for your app, coding an app, Flutter, widget of the week, google, google developers, flutter 101, get started with flutter, flutter apps, flutter widgets, build apps with flutter, GDS: Yes;
Id: 75CsnyRXf5I
Channel Id: undefined
Length: 1min 59sec (119 seconds)
Published: Wed Nov 06 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.