showAboutDialog function Null safety
- {required BuildContext context,
- String? applicationName,
- String? applicationVersion,
- Widget? applicationIcon,
- String? applicationLegalese,
- List<
Widget> ? children, - RouteSettings? routeSettings,
- Offset? anchorPoint}
Displays an AboutDialog, 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.
The context
, useRootNavigator
, routeSettings
and anchorPoint
arguments are passed to showDialog, the documentation for which discusses
how it is used.
Implementation
void showAboutDialog({
required BuildContext context,
String? applicationName,
String? applicationVersion,
Widget? applicationIcon,
String? applicationLegalese,
List<Widget>? children,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
}) {
assert(context != null);
assert(useRootNavigator != null);
showDialog<void>(
context: context,
useRootNavigator: useRootNavigator,
builder: (BuildContext context) {
return AboutDialog(
applicationName: applicationName,
applicationVersion: applicationVersion,
applicationIcon: applicationIcon,
applicationLegalese: applicationLegalese,
children: children,
);
},
routeSettings: routeSettings,
anchorPoint: anchorPoint,
);
}