showDesktopPopup static method
dynamic
showDesktopPopup({
- TencentCloudChatPopupOperationKey? operationKey,
- required BuildContext context,
- required Widget child(
- VoidCallback closeFunc
- double? width,
- double? height,
- Offset? offset,
- String? initText,
- BorderRadius? borderRadius,
- bool? isDarkBackground,
- String? title,
- VoidCallback? onSubmit,
- Widget? submitWidget,
- VoidCallback? onConfirm,
- VoidCallback? onCancel,
Implementation
static showDesktopPopup({
TencentCloudChatPopupOperationKey? operationKey,
required BuildContext context,
required Widget Function(VoidCallback closeFunc) child,
double? width,
double? height,
Offset? offset,
String? initText,
BorderRadius? borderRadius,
bool? isDarkBackground,
String? title,
VoidCallback? onSubmit,
Widget? submitWidget,
VoidCallback? onConfirm,
VoidCallback? onCancel,
}) async {
final bool? res = await _showDesktopPopupFunc?.call(
context: context,
child: child,
width: width,
height: height,
offset: offset,
initText: initText,
borderRadius: borderRadius,
isDarkBackground: isDarkBackground,
title: title,
onSubmit: onSubmit,
submitWidget: submitWidget,
onConfirm: onConfirm,
onCancel: onCancel,
);
if (res != true) {
TencentCloudChatDesktopPopup.showPopupWindow(
operationKey: operationKey ?? TencentCloudChatPopupOperationKey.custom,
context: context,
child: child,
width: width,
height: height,
offset: offset,
initText: initText,
borderRadius: borderRadius,
isDarkBackground: isDarkBackground = true,
title: title,
onSubmit: onSubmit,
submitWidget: submitWidget,
onConfirm: onConfirm,
onCancel: onCancel,
);
}
}