FlexiChipStyle.filled constructor

FlexiChipStyle.filled({
  1. Color? color,
  2. double? height,
  3. EdgeInsetsGeometry? margin,
  4. EdgeInsetsGeometry? padding,
  5. Clip? clipBehavior,
  6. Color? overlayColor,
  7. Color? shadowColor,
  8. double? elevation,
  9. TextStyle? foregroundStyle,
  10. Color? foregroundColor,
  11. double? foregroundOpacity,
  12. int? foregroundAlpha,
  13. double? foregroundSpacing,
  14. double? backgroundOpacity = .8,
  15. int? backgroundAlpha,
  16. double? borderOpacity = 0,
  17. int? borderAlpha,
  18. double? borderWidth = 0,
  19. BorderRadiusGeometry? borderRadius,
  20. BorderStyle? borderStyle = BorderStyle.none,
  21. Size? avatarSize,
  22. TextStyle? avatarForegroundStyle,
  23. Color? avatarForegroundColor,
  24. Color? avatarBackgroundColor,
  25. BorderRadiusGeometry? avatarBorderRadius,
  26. Color? checkmarkColor,
  27. double? checkmarkSize,
  28. double? checkmarkWeight,
  29. FlexiChipCheckmarkStyle? checkmarkStyle,
  30. Color? iconColor,
  31. double? iconOpacity,
  32. double? iconSize,
  33. FlexiChipStyle? selectedStyle,
  34. FlexiChipStyle? disabledStyle = const FlexiChipStyle(foregroundAlpha: FlexiChipStyle.disabledForegroundAlpha, backgroundAlpha: FlexiChipStyle.disabledBackgroundAlpha, borderAlpha: FlexiChipStyle.disabledBorderAlpha),
  35. FlexiChipStyle? hoveredStyle,
  36. FlexiChipStyle? focusedStyle,
  37. FlexiChipStyle? pressedStyle = const FlexiChipStyle(elevation: 5),
})

Create chip's style with default value for filled style.

The selectedStyle is style to be merged, when events includes FlexiChipEvent.selected.

The disabledStyle style to be merged, when events includes FlexiChipEvent.disabled.

The hoveredStyle style to be merged, when events includes FlexiChipEvent.hovered.

The focusedStyle style to be merged, when events includes FlexiChipEvent.focused.

The pressedStyle style to be merged, when events includes FlexiChipEvent.pressed.

Implementation

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,
  ),
}) {
  return FlexiChipStyle.when(
    enabled: FlexiChipStyle(
      backgroundColor: color,
      borderColor: color,
      height: height,
      margin: margin,
      padding: padding,
      clipBehavior: clipBehavior,
      overlayColor: overlayColor,
      shadowColor: shadowColor,
      elevation: elevation,
      foregroundStyle: foregroundStyle,
      foregroundColor: foregroundColor,
      foregroundOpacity: foregroundOpacity,
      foregroundAlpha: foregroundAlpha,
      foregroundSpacing: foregroundSpacing,
      backgroundOpacity: backgroundOpacity,
      backgroundAlpha: backgroundAlpha,
      borderOpacity: borderOpacity,
      borderAlpha: borderAlpha,
      borderWidth: borderWidth,
      borderRadius: borderRadius,
      borderStyle: borderStyle,
      avatarSize: avatarSize,
      avatarForegroundStyle: avatarForegroundStyle,
      avatarForegroundColor: avatarForegroundColor,
      avatarBackgroundColor: avatarBackgroundColor,
      avatarBorderRadius: avatarBorderRadius,
      checkmarkColor: checkmarkColor,
      checkmarkSize: checkmarkSize,
      checkmarkWeight: checkmarkWeight,
      checkmarkStyle: checkmarkStyle,
      iconColor: iconColor,
      iconOpacity: iconOpacity,
      iconSize: iconSize,
    ),
    selected: selectedStyle,
    disabled: disabledStyle,
    hovered: hoveredStyle,
    focused: focusedStyle,
    pressed: pressedStyle,
  );
}