Each bubble’s gradient requires knowledge of the
bubble’s location on the screen. This means that
the painting behavior requires access to layout information.
Such painting behavior isn’t possible with typical widgets 
because widgets like Container and DecoratedBox
make decisions about background colors before layout occurs,
not after. In this case, because you require custom painting
behavior, but you don’t require custom layout behavior 
or custom hit test behavior, a CustomPainter is
a great choice to get the job done.

Note:
  In cases where you need control over the child layout,
  but you don’t need control over the painting or hit testing,
  consider using a Flow widget.

In cases where you need control over the layout,
  painting, and hit testing, 
  consider defining a custom RenderBox.

Replace original background widget