Skip to content

Instantly share code, notes, and snippets.

@horgag1
Created October 31, 2018 17:48
Show Gist options
  • Save horgag1/82d3c57fa269b0a794d323e3373cd258 to your computer and use it in GitHub Desktop.
Save horgag1/82d3c57fa269b0a794d323e3373cd258 to your computer and use it in GitHub Desktop.
Widget genrateBluredImage() {
return new Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage('assets/horse.jpg'),
fit: BoxFit.cover,
),
),
//I blured the parent conainer to blur background image, you can get rid of this part
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 9.0, sigmaY: 9.0),
child: Container(
//you can change opacity with color here(I used black) for background.
decoration: new BoxDecoration(color: Colors.black.withOpacity(0.2)),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment