showCometChatCreatePoll function
Future<String?>
showCometChatCreatePoll({
- required dynamic context,
- required CometChatColorPalette colorPalette,
- required CometChatSpacing spacing,
- String? uid,
- String? guid,
- String? title,
- BaseMessage? quotedMessage,
- Group? groupObject,
- User? userObject,
showCometChatCreatePoll is a function used to show the create poll widget
Implementation
Future<String?> showCometChatCreatePoll({
required context,
required CometChatColorPalette colorPalette,
required CometChatSpacing spacing,
String? uid,
String? guid,
String? title,
BaseMessage? quotedMessage,
Group? groupObject,
User? userObject,
}) {
return showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
isDismissible: true,
backgroundColor: colorPalette.background1,
builder: (context) {
return Theme(
data: Theme.of(context).copyWith(
scaffoldBackgroundColor: colorPalette.background1,
canvasColor: colorPalette.background1,
),
child: Material(
color: colorPalette.background1,
borderRadius: BorderRadius.vertical(
top: Radius.circular(
spacing.radius6 ?? 0,
),
),
child: Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: CometChatCreatePoll(
user: uid,
group: guid,
title: title,
quotedMessage: quotedMessage,
groupObject: groupObject,
userObject: userObject,
),
),
),
);
},
);
}