showDialog method
Call this function if you wish to present the dialog.
Parameters
title: The title of the dialog.content: Descriptive text that provides additional details about the reason for the dialog.primaryActionTitle: The action title to display as part of the dialog. If you provide two actions, be sure thedefaultActioncancels the operation and leaves things unchanged.secondaryActionTitle: The secondary action title to display as part of the dialog.
Implementation
Future<AdaptyUIDialogActionType> showDialog(
String viewId, {
required String title,
required String content,
required String primaryActionTitle,
String? secondaryActionTitle,
}) async {
final dialog = AdaptyUIDialog(
title: title,
content: content,
primaryActionTitle: primaryActionTitle,
secondaryActionTitle: secondaryActionTitle,
);
return await Adapty()._invokeMethod<AdaptyUIDialogActionType>(
Method.showDialog,
(data) => AdaptyUIDialogActionTypeJSONBuilder.fromJsonValue(data as String),
{
Argument.id: viewId,
Argument.configuration: dialog.jsonValue,
},
);
}