showAdaptiveAboutDialog function
Displays either a Material or Cupertino AboutDialog depending on platform, which describes the application and provides a button to show licenses for software used by the application.
The arguments correspond to the properties on AboutDialog.
If the application has a Drawer, consider using AboutListTile instead of calling this directly.
If you do not need an about box in your application, you should at least provide an affordance to call 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.
On most platforms this function will act the same as showDialog, except for iOS and macOS, in which case it will act the same as showCupertinoDialog.
The context
, barrierDismissible
, barrierColor
, barrierLabel
,
useRootNavigator
, routeSettings
and anchorPoint
arguments are
passed to showAdaptiveDialog, the documentation for which discusses how it is used.
Implementation
void showAdaptiveAboutDialog({
required BuildContext context,
String? applicationName,
String? applicationVersion,
Widget? applicationIcon,
String? applicationLegalese,
List<Widget>? children,
bool barrierDismissible = true,
Color? barrierColor,
String? barrierLabel,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
}) {
showAdaptiveDialog<void>(
context: context,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
useRootNavigator: useRootNavigator,
builder: (BuildContext context) {
return AboutDialog.adaptive(
applicationName: applicationName,
applicationVersion: applicationVersion,
applicationIcon: applicationIcon,
applicationLegalese: applicationLegalese,
children: children,
);
},
routeSettings: routeSettings,
anchorPoint: anchorPoint,
);
}