backgroundImage method

Widget backgroundImage(
  1. DecorationImage image, {
  2. Key? key,
  3. bool animate = false,
})

Implementation

Widget backgroundImage(
  DecorationImage image, {
  Key? key,
  bool animate = false,
}) =>
    animate
        ? _StyledAnimatedBuilder(
            key: key,
            builder: (animation) {
              return _AnimatedDecorationBox(
                child: this,
                decoration: BoxDecoration(image: image),
                duration: animation.duration,
                curve: animation.curve,
              );
            },
          )
        : DecoratedBox(
            key: key,
            child: this,
            decoration: BoxDecoration(image: image),
          );