ChipsChoice<T> class
Easy way to provide a single or multiple choice chips.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChipsChoice
Constructors
-
ChipsChoice.multiple({Key? key, required List<
T> value, required C2Changed<List< onChanged, required List<T> >C2Choice< choiceItems, C2ChoiceLoader<T> >T> ? choiceLoader, required C2ChoiceStyle choiceStyle, C2ChoiceStyle? choiceActiveStyle, C2Builder<T> ? choiceLabelBuilder, C2Builder<T> ? choiceAvatarBuilder, C2Builder<T> ? choiceBuilder, WidgetBuilder? spinnerBuilder, WidgetBuilder? placeholderBuilder, WidgetBuilder? errorBuilder, bool? wrapped = false, EdgeInsetsGeometry? padding, Axis? direction = Axis.horizontal, VerticalDirection? verticalDirection = VerticalDirection.down, TextDirection? textDirection, Clip? clipBehavior = Clip.hardEdge, ScrollPhysics? scrollPhysics, MainAxisSize? mainAxisSize = MainAxisSize.max, MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment? crossAxisAlignment = CrossAxisAlignment.center, WrapAlignment? alignment = WrapAlignment.start, WrapAlignment? runAlignment = WrapAlignment.start, WrapCrossAlignment? wrapCrossAlignment = WrapCrossAlignment.start, double? spacing = 10.0, double? runSpacing = 0, String? placeholder, TextStyle? placeholderStyle, TextAlign? placeholderAlign, TextStyle? errorStyle, TextAlign? errorAlign, double? spinnerSize, Color? spinnerColor, double? spinnerThickness}) - Constructor for multiple choice
-
ChipsChoice.single({Key? key, required T value, required C2Changed<
T> onChanged, required List<C2Choice< choiceItems, C2ChoiceLoader<T> >T> ? choiceLoader, required C2ChoiceStyle choiceStyle, C2ChoiceStyle? choiceActiveStyle, C2Builder<T> ? choiceLabelBuilder, C2Builder<T> ? choiceAvatarBuilder, C2Builder<T> ? choiceBuilder, WidgetBuilder? spinnerBuilder, WidgetBuilder? placeholderBuilder, WidgetBuilder? errorBuilder, bool? wrapped = false, EdgeInsetsGeometry? padding, Axis? direction = Axis.horizontal, VerticalDirection? verticalDirection = VerticalDirection.down, TextDirection? textDirection, Clip? clipBehavior = Clip.hardEdge, ScrollPhysics? scrollPhysics, MainAxisSize? mainAxisSize = MainAxisSize.max, MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment? crossAxisAlignment = CrossAxisAlignment.center, WrapAlignment? alignment = WrapAlignment.start, WrapAlignment? runAlignment = WrapAlignment.start, WrapCrossAlignment? wrapCrossAlignment = WrapCrossAlignment.start, double? spacing = 10.0, double? runSpacing = 0, String? placeholder, TextStyle? placeholderStyle, TextAlign? placeholderAlign, TextStyle? errorStyle, TextAlign? errorAlign, double? spinnerSize, Color? spinnerColor, double? spinnerThickness}) - Costructor for single choice
Properties
- alignment → WrapAlignment?
-
if wrapped is
true
, determines how wrap will align the objectsfinal - choiceActiveStyle → C2ChoiceStyle?
-
Choice selected item style
final
-
choiceAvatarBuilder
→ C2Builder<
T> ? -
Builder for custom choice item label
final
-
choiceBuilder
→ C2Builder<
T> ? -
Builder for custom choice item
final
-
choiceItems
→ List<
C2Choice< T> > -
List of choice item
final
-
choiceLabelBuilder
→ C2Builder<
T> ? -
Builder for custom choice item label
final
-
choiceLoader
→ C2ChoiceLoader<
T> ? -
Async loader of choice items
final
- choiceStyle → C2ChoiceStyle
-
Choice unselected item style
final
- clipBehavior → Clip?
-
Clip behavior
final
- crossAxisAlignment → CrossAxisAlignment?
-
if wrapped is
false
, How the children should be placed along the cross axis.final - direction → Axis?
-
The direction to use as the main axis.
final
- errorAlign → TextAlign?
-
error text align
final
- errorBuilder → WidgetBuilder?
-
Builder for placeholder widget
final
- errorStyle → TextStyle?
-
error text style
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mainAxisAlignment → MainAxisAlignment?
-
if wrapped is
false
, How the children should be placed along the main axis.final - mainAxisSize → MainAxisSize?
-
if wrapped is
false
, How much space should be occupied in the main axis.final - padding → EdgeInsetsGeometry?
-
Container padding
final
- placeholder → String?
-
String to display when choice items is empty
final
- placeholderAlign → TextAlign?
-
placeholder text align
final
- placeholderBuilder → WidgetBuilder?
-
Builder for placeholder widget
final
- placeholderStyle → TextStyle?
-
placeholder text style
final
- runAlignment → WrapAlignment?
-
if wrapped is
true
, how the runs themselves should be placed in the cross axis.final - runSpacing → double?
-
if wrapped is
true
, how much space to place between the runs themselves in the cross axis.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollPhysics → ScrollPhysics?
-
if wrapped is
false
, How the scroll view should respond to user input.final - spacing → double?
-
if wrapped is
true
, how much space to place between children in a run in the main axis.final - spinnerBuilder → WidgetBuilder?
-
Builder for spinner widget
final
- spinnerColor → Color?
-
spinner color
final
- spinnerSize → double?
-
spinner size
final
- spinnerThickness → double?
-
spinner thickness
final
- textDirection → TextDirection?
-
Determines the order to lay children out horizontally and how to interpret start and end in the horizontal direction.
final
- verticalDirection → VerticalDirection?
-
Determines the order to lay children out vertically and how to interpret start and end in the vertical direction.
final
- wrapCrossAlignment → WrapCrossAlignment?
-
if wrapped is
true
, how the children within a run should be aligned relative to each other in the cross axis.final - wrapped → bool?
-
Whether the chips is wrapped or scrollable
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ChipsChoiceState< T> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultPadding → EdgeInsetsGeometry
-
default padding for spinner and placeholder
final
- defaultPlaceholder → String
-
default placeholder string
final
- defaultScrollableChipMargin → EdgeInsetsGeometry
-
default chip margin in scrollable list
final
- defaultScrollablePadding → EdgeInsetsGeometry
-
default padding for scrollable list
final
- defaultWrappedChipMargin → EdgeInsetsGeometry
-
default chip margin in wrapped list
final
- defaultWrappedPadding → EdgeInsetsGeometry
-
default padding for wrapped list
final