ePrivacy and GPDR Cookie Consent by CookieConsent.com
menu

AboutDialog in flutter | How to use AboutDialog

 

AboutDialog widget is used for showing the licenses of the software which is currently used by the application. 

AboutDialog widget is a material widget that is very similar to alert dialog but it has two buttons by default first one is CLOSE  and the second is VIEW LICENSES.  On pressing the close button the dialog box closes simply and On pressing the View Licenses button, a new screen opens which has the details of the Licenses which are currently used by the software of the application. The screen that opens on clicking the view licenses button is also a widget named LicensePage( ) widget.

AboutDialog widget Looks like this


The AlertDialog widget has the following properties which are elaborated briefly below.
  • applicationIcon
  • applicationLegalese
  • applicationName
  • applicationVersion
  • children

applicationIcon 

application property is used for displaying icons on the dialog box. 
If you don't set this property no icon will be shown.

applicationName

applicationName property is used for displaying the name of the application.
You have to assign String value in it.

applicationVersion

applicationVersion property is used for displaying the version of the application.
It accepts a String type value.

applicationLegalese

applicationLegalese property is used for the details about the legal copyright.
It can be the copyright Notice.
It accepts a String type value.

 
class MyHome extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return(
        Scaffold(
          body: Center(
            child: AboutDialog(
              children: <Widget>[
                // You can add other widgets here
              ],
              applicationIcon: Icon(Icons.spa),
              applicationName: "This is a text",
              applicationVersion: "10.0.3",
              applicationLegalese: "This is something leagal note",
            ),
          ),
        )
    );
  }
}



                          




*             *              *

Comments

Post a Comment