sososdk / flash

⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

Home Page:https://sososdk.github.io/flash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to set background using Linear Gradient

sosualfred opened this issue · comments

Flash version 2.0.5 had a backgroundGradient property for setting a background using a gradient.

In version 3.0.5 this property is no longer available. and I am unable to set a background using linear gradient.

image

Hi @sosualfred , please use flash: ^3.0.5+1 with the builder param.

context.showFlash<bool>(
  builder: (context, controller) => FlashBar(
    ......
    builder: (context, child) {
      return DecoratedBox(
        decoration: BoxDecoration(
          gradient: LinearGradient(colors: [Colors.black, Colors.red]),
        ),
        child: child,
      );
    },
  ),
);

Thanks, I'd check it out.