showLicensePage function

void showLicensePage ({@required BuildContext context, String applicationName, String applicationVersion, Widget applicationIcon, String applicationLegalese })

Displays a LicensePage, which shows licenses for software used by the application.

The arguments correspond to the properties on LicensePage.

If the application has a Drawer, consider using AboutListTile instead of calling this directly.

The AboutDialog shown by showAboutDialog includes a button that calls showLicensePage.

The licenses shown on the LicensePage are those returned by the LicenseRegistry API, which can be used to add more licenses to the list.

Implementation

void showLicensePage({
  @required BuildContext context,
  String applicationName,
  String applicationVersion,
  Widget applicationIcon,
  String applicationLegalese
}) {
  assert(context != null);
  Navigator.push(context, new MaterialPageRoute<void>(
    builder: (BuildContext context) => new LicensePage(
      applicationName: applicationName,
      applicationVersion: applicationVersion,
      applicationLegalese: applicationLegalese
    )
  ));
}