ChipConfig class
Configuration for the chip. backgroundColor is the background color of the chip. Defaults to Colors.white. padding is the padding of the chip. radius is the radius of the chip. Defaults to BorderRadius.circular(18).
labelStyle is the style of the label. labelPadding is the padding of the label.
deleteIcon is the icon that is used to delete the chip. deleteIconColor is the color of the delete icon.
separator is the separator between the chips. Default is a sized box with width of 8. spacing is the width of the separator. If separator is provided, this value is ignored.
wrapType is the type of the chip. Default is WrapType.scroll. WrapType.wrap will wrap the chips to next line if there is not enough space. WrapType.scroll will scroll the chips.
- WrapType.scroll is used to scroll the chips.
- WrapType.wrap is used to wrap the chips in a row.
An example of a ChipConfig is:
const ChipConfig(
deleteIcon: Icon(Icons.delete, color: Colors.red),
wrapType: WrapType.scroll,
separator: const Divider(),
padding: const EdgeInsets.all(8),
labelStyle: TextStyle(fontSize: 16),
labelPadding: const EdgeInsets.symmetric(horizontal: 8),
radius: BorderRadius.circular(18),
backgroundColor: Colors.white,
)
Constructors
- ChipConfig.new({Icon? deleteIcon, Color deleteIconColor = Colors.white, Color? backgroundColor, EdgeInsets padding = const EdgeInsets.only(left: 12, top: 0, right: 4, bottom: 0), double radius = 18, double spacing = 8, double runSpacing = 8, Widget? separator, Color labelColor = Colors.white, TextStyle? labelStyle, WrapType wrapType = WrapType.scroll, EdgeInsets labelPadding = EdgeInsets.zero, bool autoScroll = false})
-
const
Properties
- autoScroll → bool
-
final
- backgroundColor → Color?
-
final
- deleteIcon → Icon?
-
final
- deleteIconColor → Color
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- labelColor → Color
-
final
- labelPadding → EdgeInsets
-
final
- labelStyle → TextStyle?
-
final
- padding → EdgeInsets
-
final
- radius → double
-
final
- runSpacing → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- separator → Widget?
-
final
- spacing → double
-
final
- wrapType → WrapType
-
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