FlexiChipStyle class

Signature for the function that returns a value of type FlexiChipStyle based on a given set of events. Default chip's style.

Constructors

FlexiChipStyle({double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Clip? clipBehavior, Color? overlayColor, Color? shadowColor, double? elevation, TextStyle? foregroundStyle, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, double? foregroundSpacing, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, BorderRadiusGeometry? borderRadius, BorderStyle? borderStyle, Size? avatarSize, TextStyle? avatarForegroundStyle, Color? avatarForegroundColor, Color? avatarBackgroundColor, BorderRadiusGeometry? avatarBorderRadius, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, FlexiChipCheckmarkStyle? checkmarkStyle, Color? iconColor, double? iconOpacity, double? iconSize})
const
FlexiChipStyle.driven(DrivenPropertyResolver<FlexiChipStyle?> callback)
Create an event driven chip's style using callback.
factory
FlexiChipStyle.filled({Color? color, double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Clip? clipBehavior, Color? overlayColor, Color? shadowColor, double? elevation, TextStyle? foregroundStyle, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, double? foregroundSpacing, double? backgroundOpacity = .8, int? backgroundAlpha, double? borderOpacity = 0, int? borderAlpha, double? borderWidth = 0, BorderRadiusGeometry? borderRadius, BorderStyle? borderStyle = BorderStyle.none, Size? avatarSize, TextStyle? avatarForegroundStyle, Color? avatarForegroundColor, Color? avatarBackgroundColor, BorderRadiusGeometry? avatarBorderRadius, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, FlexiChipCheckmarkStyle? checkmarkStyle, Color? iconColor, double? iconOpacity, double? iconSize, FlexiChipStyle? selectedStyle, FlexiChipStyle? disabledStyle = const FlexiChipStyle(foregroundAlpha: FlexiChipStyle.disabledForegroundAlpha, backgroundAlpha: FlexiChipStyle.disabledBackgroundAlpha, borderAlpha: FlexiChipStyle.disabledBorderAlpha), FlexiChipStyle? hoveredStyle, FlexiChipStyle? focusedStyle, FlexiChipStyle? pressedStyle = const FlexiChipStyle(elevation: 5)})
Create chip's style with default value for filled style.
factory
FlexiChipStyle.from(FlexiChipStyle? other)
Create a chip's style from another style
FlexiChipStyle.outlined({Color? color, double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Clip? clipBehavior, Color? overlayColor, Color? shadowColor, double? elevation, TextStyle? foregroundStyle, double? foregroundOpacity, int? foregroundAlpha, double? foregroundSpacing, Color? backgroundColor, double? backgroundOpacity = 0, int? backgroundAlpha, double? borderOpacity = 1, int? borderAlpha, double? borderWidth = 1, BorderRadiusGeometry? borderRadius, BorderStyle? borderStyle = BorderStyle.solid, Size? avatarSize, TextStyle? avatarForegroundStyle, Color? avatarForegroundColor, BorderRadiusGeometry? avatarBorderRadius, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, FlexiChipCheckmarkStyle? checkmarkStyle, Color? iconColor, double? iconOpacity, double? iconSize, FlexiChipStyle? selectedStyle, FlexiChipStyle? disabledStyle = const FlexiChipStyle(foregroundAlpha: FlexiChipStyle.disabledForegroundAlpha, borderAlpha: FlexiChipStyle.disabledBorderAlpha), FlexiChipStyle? hoveredStyle, FlexiChipStyle? focusedStyle, FlexiChipStyle? pressedStyle})
Create chip's style with default value for outlined style.
factory
FlexiChipStyle.toned({double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Clip? clipBehavior, Color? overlayColor, Color? shadowColor, double? elevation, TextStyle? foregroundStyle, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, double? foregroundSpacing, Color? backgroundColor, double? backgroundOpacity = .12, int? backgroundAlpha, Color? borderColor, double? borderOpacity = 1, int? borderAlpha, double? borderWidth = 1, BorderRadiusGeometry? borderRadius, BorderStyle? borderStyle = BorderStyle.none, Size? avatarSize, TextStyle? avatarForegroundStyle, Color? avatarForegroundColor, Color? avatarBackgroundColor, BorderRadiusGeometry? avatarBorderRadius, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, FlexiChipCheckmarkStyle? checkmarkStyle, Color? iconColor, double? iconOpacity, double? iconSize, FlexiChipStyle? selectedStyle, FlexiChipStyle? disabledStyle = const FlexiChipStyle(foregroundAlpha: FlexiChipStyle.disabledForegroundAlpha, backgroundAlpha: FlexiChipStyle.disabledBackgroundAlpha, borderAlpha: FlexiChipStyle.disabledBorderAlpha), FlexiChipStyle? hoveredStyle, FlexiChipStyle? focusedStyle, FlexiChipStyle? pressedStyle})
Create chip's style with default value for toned style.
factory
FlexiChipStyle.when({FlexiChipStyle? enabled, FlexiChipStyle? selected, FlexiChipStyle? disabled, FlexiChipStyle? hovered, FlexiChipStyle? focused, FlexiChipStyle? pressed})
Create a chip's style when some events occurs.
factory

Properties

avatarBackgroundColor Color?
Color to be used for the avatar's background.
final
avatarBorderRadius BorderRadiusGeometry?
The radii for each corner of the avatar's border.
final
avatarForegroundColor Color?
Color to be used for the avatar's foreground (checkmark, or text).
final
avatarForegroundStyle TextStyle?
The style to be applied to the avatar's label.
final
avatarSize Size?
Defaults to FlexiChipStyle.defaultAvatarSize.
final
backgroundAlpha int?
Alpha to be apply to backgroundColor.
final
backgroundColor Color?
Color to be used for the chip's background.
final
backgroundOpacity double?
Opacity to be apply to backgroundColor.
final
borderAlpha int?
Alpha to be apply to borderColor.
final
borderColor Color?
Color to be used for the chip's border.
final
borderOpacity double?
Opacity to be apply to borderColor.
final
borderRadius BorderRadiusGeometry?
The radii for each corner of the chip's border.
final
borderStyle BorderStyle?
The style of this side of the chip's border.
final
borderWidth double?
The width of this side of the chip's border, in logical pixels.
final
checkmarkColor Color?
The Color to be apply to the checkmark.
final
checkmarkSize double?
Defaults to FlexiChipStyle.defaultCheckmarkSize.
final
checkmarkStyle FlexiChipCheckmarkStyle?
Defaults to FlexiChipCheckmarkStyle.sharp.
final
checkmarkWeight double?
Stroke width of the checkmark.
final
clipBehavior Clip?
The chip's content will be clipped (or not) according to this option.
final
elevation double?
The chip's z-coordinate relative to the parent at which to place this physical object.
final
foregroundAlpha int?
Alpha to be apply to foregroundColor.
final
foregroundColor Color?
The color to be applied to the chip's label, icon, and checkmark
final
foregroundOpacity double?
Opacity to be apply to foregroundColor.
final
foregroundSpacing double?
How much space to place between chip's foreground widget in a run in the main axis.
final
foregroundStyle TextStyle?
The style to be applied to the chip's label.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Defaults to FlexiChipStyle.defaultHeight
final
iconColor Color?
Color to be used for the icon's inside the chip.
final
iconOpacity double?
Opacity to be apply to iconColor.
final
iconSize double?
The size of the icon's inside the chip, in logical pixels.
final
isFilled bool
Whether the chip's has solid background color or not
no setter
isOutlined bool
Whether the chip's has outline or not
no setter
isToned bool
Whether the chip's has toned background color or not
no setter
margin EdgeInsetsGeometry?
Empty space to surround the outside chip.
final
overlayColor Color?
Defines the ink response colors.
final
padding EdgeInsetsGeometry?
The padding between the contents of the chip and the outside chip.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
When elevation is non zero the color to use for the chip's shadow color.
final

Methods

copyWith({double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Clip? clipBehavior, Color? overlayColor, Color? shadowColor, double? elevation, TextStyle? foregroundStyle, Color? foregroundColor, double? foregroundOpacity, int? foregroundAlpha, double? foregroundSpacing, Color? backgroundColor, double? backgroundOpacity, int? backgroundAlpha, Color? borderColor, double? borderOpacity, int? borderAlpha, double? borderWidth, BorderRadiusGeometry? borderRadius, BorderStyle? borderStyle, Size? avatarSize, TextStyle? avatarForegroundStyle, Color? avatarForegroundColor, Color? avatarBackgroundColor, BorderRadiusGeometry? avatarBorderRadius, Color? checkmarkColor, double? checkmarkSize, double? checkmarkWeight, FlexiChipCheckmarkStyle? checkmarkStyle, Color? iconColor, double? iconOpacity, double? iconSize, FlexiChipStyle? selectedStyle, FlexiChipStyle? disabledStyle, FlexiChipStyle? hoveredStyle, FlexiChipStyle? focusedStyle, FlexiChipStyle? pressedStyle}) FlexiChipStyle
Creates a copy of this FlexiChipStyle but with the given fields replaced with the new values.
merge(FlexiChipStyle? other) FlexiChipStyle
Creates a copy of this FlexiChipStyle but with the given fields replaced with the new values.
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

Static Methods

brightnessFor(Color? color) Brightness?
Determines whether the given Color is Brightness.light or Brightness.dark.
colorOnSurface(Color? surface, [Color? onLight = colorBlack, Color? onDark = colorWhite]) Color?
Estimate foreground color on surface
colorWithAlpha(Color color, int? alpha) Color
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
colorWithOpacity(Color color, double? opacity) Color
Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0).
evaluate(FlexiChipStyle? value, Set<WidgetEvent> events) FlexiChipStyle?
Resolves the value for the given set of events if value is an event driven FlexiChipStyle, otherwise returns the value itself.