PollStyle class

Available extensions
Annotations

Constructors

PollStyle({StyleVariant variant = StyleVariant.material3Expressive, EdgeInsets margin = const EdgeInsets.symmetric(horizontal: 8), EdgeInsets? padding, Decoration? decoration, TextStyle? optionTextStyle, OutlinedBorder? optionShape, Color? progressBarColor, double? progressBarHeight, BorderRadius? containerRadius})
const

Properties

containerRadius → BorderRadius?
Corner radius of the Expressive card. Defaults to 28.
final
decoration → Decoration?
Replaces the default card. Overrides containerRadius.
final
effectiveOptionShape → OutlinedBorder?

Available on PollStyle, provided by the PollStyleDefaults extension

Null lets the Expressive button morph its own shape.
no setter
effectivePadding → EdgeInsets

Available on PollStyle, provided by the PollStyleDefaults extension

no setter
effectiveProgressBarHeight → double

Available on PollStyle, provided by the PollStyleDefaults extension

30 makes Expressive result rows as tall as the option buttons.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isExpressive → bool

Available on PollStyle, provided by the PollStyleDefaults extension

no setter
margin → EdgeInsets
final
optionsGap → double

Available on PollStyle, provided by the PollStyleDefaults extension

no setter
optionShape → OutlinedBorder?
Shape of every option button in every state. When null, Material 3 uses a StadiumBorder and Expressive uses the button's own shapes, which morph when pressed or selected.
final
optionTextStyle → TextStyle?
final
padding → EdgeInsets?
Defaults to 16/16/16/12 for Expressive and 15/15/15/5 for Material 3.
final
progressBarColor → Color?
final
progressBarHeight → double?
Defaults to 30 for Expressive, which makes result rows as tall as the option buttons, and 35 for Material 3.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
titleGap → double

Available on PollStyle, provided by the PollStyleDefaults extension

no setter
variant → StyleVariant
StyleVariant.material3Expressive by default; use StyleVariant.material3 for the 2.x look.
final
voteButtonGap → double

Available on PollStyle, provided by the PollStyleDefaults extension

no setter

Methods

copyWith({StyleVariant? variant, EdgeInsets? margin, EdgeInsets? padding, Decoration? decoration, TextStyle? optionTextStyle, OutlinedBorder? optionShape, Color? progressBarColor, double? progressBarHeight, BorderRadius? containerRadius}) → PollStyle
effectiveDecoration(BuildContext context) → Decoration

Available on PollStyle, provided by the PollStyleDefaults extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
titleStyle(BuildContext context) → TextStyle?

Available on PollStyle, provided by the PollStyleDefaults extension

toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited