showChatUIKitBottomSheet<T> function
Future<T?>
showChatUIKitBottomSheet<T>({
- required BuildContext context,
- List<
ChatUIKitEventAction< ? items,T> > - Color? backgroundColor,
- Color? barrierColor,
- bool enableRadius = true,
- String? title,
- TextStyle? titleStyle,
- Widget? titleWidget,
- Widget? body,
- String? cancelLabel,
- bool showCancel = true,
- TextStyle? cancelLabelStyle,
- double? height,
- bool isDismissible = true,
Implementation
Future<T?> showChatUIKitBottomSheet<T>({
required BuildContext context,
List<ChatUIKitEventAction<T>>? items,
Color? backgroundColor,
Color? barrierColor,
bool enableRadius = true,
String? title,
TextStyle? titleStyle,
Widget? titleWidget,
Widget? body,
String? cancelLabel,
bool showCancel = true,
TextStyle? cancelLabelStyle,
double? height,
bool isDismissible = true,
}) {
assert(
(items?.isNotEmpty == true || body != null),
'items and body cannot be null at the same time',
);
return showModalBottomSheet(
clipBehavior: !enableRadius ? null : Clip.hardEdge,
isDismissible: isDismissible,
shape: !enableRadius
? null
: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.0),
topRight: Radius.circular(16.0),
),
),
backgroundColor: backgroundColor,
barrierColor: barrierColor,
useSafeArea: true,
context: context,
builder: (BuildContext context) {
return ChatUIKitBottomSheet(
title: title,
titleStyle: titleStyle,
titleWidget: titleWidget,
body: body,
items: items,
cancelLabel: cancelLabel,
height: height,
cancelLabelStyle: cancelLabelStyle,
showCancel: showCancel,
);
},
);
}