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",
optionIconUrl: "assets/option.png",
optionIconUrlPackageName: "com.example.polls",
optionStyle: PollsOptionStyle(
selectedOptionTextStyle: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
),
unselectedOptionTextStyle: TextStyle(
color: Colors.black,
),
selectedOptionColor: Colors.blue,
unselectedOptionColor: Colors.grey,
),
);
Constructors
- PollsConfiguration({CreatePollsStyle? createPollsStyle, PollsBubbleStyle? pollsBubbleStyle, CometChatTheme? theme, String? title, String? questionPlaceholderText, String? answerPlaceholderText, String? answerHelpText, String? addAnswerText, Widget? deleteIcon, Widget? closeIcon, Widget? createPollIcon, String? optionTitle, String? optionIconUrl, String? optionIconUrlPackageName, 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
- createPollsStyle → CreatePollsStyle?
-
createPollsStyle styling parameters for creating poll
final
- deleteIcon → Widget?
-
deleteIcon
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- optionIconUrl → String?
-
optionIconUrl is the path to the icon image for the option for this extension
final
- optionIconUrlPackageName → String?
-
optionIconUrlPackageName is the name of the package where the icon for the option for this extension is located
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 → PollsBubbleStyle?
-
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
- theme → CometChatTheme?
-
theme sets custom theme
final
- 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