Bubble constructor

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

Implementation

Bubble({
  this.child,
  Radius? radius,
  bool? showNip,
  BubbleNip? nip,
  double? nipWidth,
  double? nipHeight,
  double? nipOffset,
  double? nipRadius,
  bool? stick,
  Color? color,
  double? elevation,
  Color? shadowColor,
  BubbleEdges? padding,
  BubbleEdges? margin,
  Alignment? alignment,
  BubbleStyle? style,
})  : color = color ?? style?.color ?? Colors.white,
      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,
        ),
      );