PollsConfiguration class
PollsConfiguration is a data class that has configuration properties
to customize the functionality and appearance of PollsExtension
PollsConfiguration pollsConfiguration = PollsConfiguration(
createPollsStyle: CreatePollsStyle(
backgroundColor: Colors.white,
questionTextStyle: TextStyle(fontSize: 16),
addAnswerTextStyle: TextStyle(color: Colors.blue),
answerTextStyle: TextStyle(fontSize: 16),
deleteIconColor: Colors.red,
addIconColor: Colors.blue,
padding: EdgeInsets.all(8.0),
),
pollsBubbleStyle: PollsBubbleStyle(),
theme: CometChatTheme(),
title: "Create a Poll",
questionPlaceholderText: "Ask a Question",
answerPlaceholderText: "Answer Option",
answerHelpText: "Add or Remove Options",
addAnswerText: "Add Another Option",
deleteIcon: Icon(Icons.delete),
closeIcon: Icon(Icons.close),
createPollIcon: Icon(Icons.poll),
optionTitle: "Option",
optionIcon: Icon(Icons.poll),
optionStyle: PollsOptionStyle(
selectedOptionTextStyle: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
unselectedOptionTextStyle: TextStyle(
color: Colors.black,
),
selectedOptionColor: Colors.blue,
unselectedOptionColor: Colors.grey,
),
);
Constructors
- PollsConfiguration({CometChatPollsBubbleStyle? pollsBubbleStyle, String? title, String? questionPlaceholderText, String? answerPlaceholderText, String? answerHelpText, String? addAnswerText, Widget? deleteIcon, Widget? closeIcon, Widget? createPollIcon, String? optionTitle, Widget? optionIcon, PollsOptionStyle? optionStyle})
Properties
- addAnswerText → String?
-
addAnswerText default is 'Add Another Answer'
final
- answerHelpText → String?
-
answerHelpText default is 'SET THE ANSWERS'
final
- answerPlaceholderText → String?
-
answerPlaceholderText default is 'Answer 1'
final
- closeIcon → Widget?
-
closeIcon replace close icon
final
- createPollIcon → Widget?
-
createPollIcon replace poll icon
final
- deleteIcon → Widget?
-
deleteIcon
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- optionIcon → Widget?
-
optionIcon is the icon for the option for this extension
final
- optionStyle → PollsOptionStyle?
-
optionStyle provides style to the option that generates a polls
final
- optionTitle → String?
-
optionTitle is the name for the option for this extension
final
- pollsBubbleStyle → CometChatPollsBubbleStyle?
-
pollsBubbleStyle styling parameters for polls bubble
final
- questionPlaceholderText → String?
-
questionPlaceholderText default is 'Question'
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
title title default is 'Create Poll'
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited