Skip to content

Instantly share code, notes, and snippets.

@SupremeDeity
Created January 23, 2023 13:50
Show Gist options
  • Select an option

  • Save SupremeDeity/6c3c2a524ac58372821b15a61c624c54 to your computer and use it in GitHub Desktop.

Select an option

Save SupremeDeity/6c3c2a524ac58372821b15a61c624c54 to your computer and use it in GitHub Desktop.
Flutter Background Backdrop image blur combined with fading effect.
ClipRect(
child: ShaderMask(
shaderCallback: (rect) {
return LinearGradient(
begin: Alignment.center,
end: Alignment.bottomCenter,
colors: [
Theme.of(context).backgroundColor,
Colors.transparent
],
).createShader(Rect.fromLTRB(0, 0, rect.width, rect.height));
},
blendMode: BlendMode.dstIn,
child: ImageFiltered(
imageFilter: ImageFilter.blur(
sigmaX: 15, sigmaY: 15, tileMode: TileMode.mirror),
child: Image.network(
"",
fit: BoxFit.cover,
),
),
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment