openAdaptiveDialog function
Future
openAdaptiveDialog(
- BuildContext context,
- Widget content,
- AdaptiveDialogProps props,
- List<
CupertinoDialogAction> ? defaultCupertinoActions,
Implementation
Future openAdaptiveDialog(
BuildContext context,
Widget content,
AdaptiveDialogProps props,
List<CupertinoDialogAction>? defaultCupertinoActions,
) {
final ThemeData theme = Theme.of(context);
switch (theme.platform) {
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return openCupertinoDialog(
context, content, props.cupertinoProps, defaultCupertinoActions);
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
default:
return openMaterialDialog(context, content, props.materialProps);
}
}