[英]Create glass UI with flutter
as title say I'd like to create a ui like this but I can't obtain the same result.正如标题所说,我想创建一个这样的用户界面,但我无法获得相同的结果。
Right now I'm using this code:现在我正在使用这段代码:
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('images/greydrop.jpeg'),
fit: BoxFit.cover,
),
),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: Scaffold(
backgroundColor: Colors.white.withOpacity(0.6),
appBar: AppBar(...),
body : ....
I'm using an image with different type of grey.我正在使用具有不同类型灰色的图像。 My result is the follow :
我的结果如下:
you can use simple "glassy" library.您可以使用简单的“玻璃”库。 https://pub.dev/packages/glassy
https://pub.dev/packages/glassy
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.