showChatUIKitDialog<T> function

Future<T?> showChatUIKitDialog<T>({
  1. required BuildContext context,
  2. required List<ChatUIKitDialogAction<T>> actionItems,
  3. String? content,
  4. String? title,
  5. List<ChatUIKitDialogInputContentItem>? inputItems,
  6. TextStyle? hiddenStyle,
  7. double? leftRightPadding,
  8. Color barrierColor = Colors.black54,
  9. bool barrierDismissible = true,
  10. ChatUIKitDialogRectangleType? borderType,
})

Implementation

Future<T?> showChatUIKitDialog<T>({
  required BuildContext context,
  required List<ChatUIKitDialogAction<T>> actionItems,
  String? content,
  String? title,
  List<ChatUIKitDialogInputContentItem>? inputItems,
  TextStyle? hiddenStyle,
  double? leftRightPadding,
  Color barrierColor = Colors.black54,
  bool barrierDismissible = true,
  ChatUIKitDialogRectangleType? borderType,
}) async {
  ChatUIKitDialogRectangleType type =
      borderType ?? ChatUIKitSettings.dialogRectangleType;
  return showDialog(
    barrierColor: barrierColor,
    barrierDismissible: barrierDismissible,
    context: context,
    builder: (context) {
      return ChatUIKitDialog(
        title: title,
        content: content,
        inputItems: inputItems,
        leftRightPadding: leftRightPadding ?? defaultLeftRightPadding,
        hiddenStyle: hiddenStyle,
        actionItems: actionItems,
        borderType: type,
      );
    },
  );
}