Bubble constructor

Bubble({
  1. Key? key,
  2. Widget? child,
  3. Radius? radius,
  4. bool? showNip,
  5. BubbleNip? nip,
  6. double? nipWidth,
  7. double? nipHeight,
  8. double? nipOffset,
  9. double? nipRadius,
  10. bool? stick,
  11. Color? color,
  12. Color? borderColor,
  13. double? borderWidth,
  14. bool? borderUp,
  15. double? elevation,
  16. Color? shadowColor,
  17. BubbleEdges? padding,
  18. BubbleEdges? margin,
  19. AlignmentGeometry? alignment,
  20. BubbleStyle? style,
})

Implementation

Bubble({
  Key? key,
  this.child,
  Radius? radius,
  bool? showNip,
  BubbleNip? nip,
  double? nipWidth,
  double? nipHeight,
  double? nipOffset,
  double? nipRadius,
  bool? stick,
  Color? color,
  Color? borderColor,
  double? borderWidth,
  bool? borderUp,
  double? elevation,
  Color? shadowColor,
  BubbleEdges? padding,
  BubbleEdges? margin,
  AlignmentGeometry? alignment,
  BubbleStyle? style,
})  : color = color ?? style?.color ?? Colors.white,
      borderColor = borderColor ?? style?.borderColor ?? Colors.transparent,
      borderWidth = borderWidth ?? style?.borderWidth ?? 1,
      borderUp = borderUp ?? style?.borderUp ?? true,
      elevation = elevation ?? style?.elevation ?? 1,
      shadowColor = shadowColor ?? style?.shadowColor ?? Colors.black,
      margin = EdgeInsets.only(
        left: margin?.left ?? style?.margin?.left ?? 0,
        top: margin?.top ?? style?.margin?.top ?? 0,
        right: margin?.right ?? style?.margin?.right ?? 0,
        bottom: margin?.bottom ?? style?.margin?.bottom ?? 0,
      ),
      alignment = alignment ?? style?.alignment,
      bubbleClipper = BubbleClipper(
        radius: radius ?? style?.radius ?? const Radius.circular(6),
        showNip: showNip ?? style?.showNip ?? true,
        nip: nip ?? style?.nip ?? BubbleNip.no,
        nipWidth: nipWidth ?? style?.nipWidth ?? 8,
        nipHeight: nipHeight ?? style?.nipHeight ?? 10,
        nipOffset: nipOffset ?? style?.nipOffset ?? 0,
        nipRadius: nipRadius ?? style?.nipRadius ?? 1,
        stick: stick ?? style?.stick ?? false,
        padding: EdgeInsets.only(
          left: padding?.left ?? style?.padding?.left ?? 8,
          top: padding?.top ?? style?.padding?.top ?? 6,
          right: padding?.right ?? style?.padding?.right ?? 8,
          bottom: padding?.bottom ?? style?.padding?.bottom ?? 6,
        ),
      ),
      super(key: key);