Created
January 23, 2023 13:50
-
-
Save SupremeDeity/6c3c2a524ac58372821b15a61c624c54 to your computer and use it in GitHub Desktop.
Flutter Background Backdrop image blur combined with fading effect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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