showLicensePage function

void showLicensePage(
  1. {required BuildContext context,
  2. Widget? title,
  3. ScaffoldBuilder? scaffoldBuilder,
  4. Map<String, String>? values}
)

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

The arguments correspond to the properties on LicenseListPage.

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

The AboutContent shown by showAboutPage includes a button that calls showLicensePage.

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

Implementation

void showLicensePage({
  required BuildContext context,
  Widget? title,
  ScaffoldBuilder? scaffoldBuilder,
  Map<String, String>? values,
}) {
  if (isCupertino(context)) {
    Navigator.push(
        context,
        CupertinoPageRoute<void>(
            builder: (BuildContext context) => LicenseListPage(
                  title: title,
                  scaffoldBuilder: scaffoldBuilder,
                  values: values,
                )));
  } else {
    Navigator.push(
        context,
        MaterialPageRoute<void>(
            builder: (BuildContext context) => LicenseListPage(
                  title: title,
                  scaffoldBuilder: scaffoldBuilder,
                  values: values,
                )));
  }
}