繁体   English   中英

如何将背景过滤器应用于整个屏幕,而不是颤动中的特定小部件?

[英]How to apply backdrop filter to the entire screen but less a specific widget in flutter?

我想做一个很酷的教程对话框。 我想在整个屏幕上都有一个黑色背景过滤器,但要减少弹出窗口和我想突出显示的屏幕部分。 我怎样才能做到这一点?

用 BackDropFilter 包装对话框

return new BackdropFilter(
    filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
    child: Dialog(
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.0)),
      backgroundColor: Color(ColorResources.BLACK_ALPHA_65),
      child: _dialogContent(),
    )
);

Widget _dialogContent() {}//Your dialog view

参考链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM