KEMBAR78
Lecture 7 | PDF | Dialog Box | Icon (Computing)
0% found this document useful (0 votes)
15 views26 pages

Lecture 7

The document discusses different dialog widgets in Flutter like AlertDialog, SimpleDialog and SimpleDialogOption. It explains the properties and usage of these dialog widgets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views26 pages

Lecture 7

The document discusses different dialog widgets in Flutter like AlertDialog, SimpleDialog and SimpleDialogOption. It explains the properties and usage of these dialog widgets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Software Engineering 2

Lecture 7
2023 2024

11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
11/13/2023
Flutter
‫المرجع‬
Flutter documentation

11/13/2023
showDialog
• Displays a Material dialog above the current contents of the app
• This function takes a builder which typically builds a Dialog widget.
• The barrierDismissible argument is used to indicate whether tapping
on the barrier will dismiss the dialog. It is true by default and can not
be null.
• The barrierColor argument is used to specify the color of the modal
barrier that darkens everything below the dialog. If null the default
color Colors.black54 is used.

11/13/2023
AlertDialog class

• An alert dialog (also known as a basic dialog) informs the user about
situations that require acknowledgment. An alert dialog has an
optional title and an optional list of actions. The title is displayed
above the content and the actions are displayed below the content.

11/13/2023
AlertDialog class
Properties
• actions
The (optional) set of actions that are displayed at the bottom of the dialog
• backgroundColor
The background color of the surface of this Dialog.
• content
The (optional) content of the dialog is displayed in the center of the dialog
• contentPadding
Padding around the content.

11/13/2023
AlertDialog class
Properties
• contentTextStyle
Style for the text in the content of this AlertDialog
• elevation
The z-coordinate of this Dialog.
• icon
An optional icon to display at the top of the dialog.
• iconColor
Color for the Icon in the icon of this AlertDialog.

11/13/2023
AlertDialog class
Properties
• iconPadding
Padding around the icon.
• shape
The shape of this dialog's border.
• title
The (optional) title of the dialog is displayed in a large font at the top of the
dialog, below the (optional) icon.
• titlePadding
Padding around the title.

11/13/2023
AlertDialog class
Properties
• shadowColor
The color used to paint a drop shadow under the dialog's Material, which
reflects the dialog's elevation.
• titleTextStyle
Style for the text in the title of this AlertDialog.

11/13/2023
SimpleDialog class

• simple dialog offers the user a choice between several options.


• A simple dialog has an optional title that is displayed above the
choices.
• Choices are normally represented using SimpleDialogOption widgets.

11/13/2023
SimpleDialog class
Properties
• backgroundColor
The background color of the surface of this Dialog.
• children → List<Widget>?
The (optional) content of the dialog
• title
The (optional) title of the dialog is displayed in a large font at the top of the dialog.
• titlePadding
Padding around the title.
• titleTextStyle → TextStyle?
Style for the text in the title of this SimpleDialog.

11/13/2023
SimpleDialog class
Properties
• contentPadding
Padding around the content.
• elevation
The z-coordinate of this Dialog.
• shadowColor
The color used to paint a drop shadow under the dialog's Material, which
reflects the dialog's elevation.
• shape
The shape of this dialog's border.

11/13/2023
SimpleDialogOption
Properties
• child
The widget below this widget in the tree.
• onPressed
The callback that is called when this option is selected.
• padding
The amount of space to surround the child with.

11/13/2023

You might also like