颤动中的透明容器

Shi*_*ngh 0 containers transparent dart flutter

我是颤振的初学者,尝试在颤振中制作透明容器。它与背景应该是 100% 透明。我尝试使用Colors.transparent作为容器的颜色属性,但这不是我想要的。

Rut*_*ana 5

尝试使用不透明度小部件。在本例中添加您的容器而不是 MyTransparentWidget() ,就是这样。

 Opacity(
            opacity: 0,
            child: Card(
              elevation: 5,
              child: <YOUR WIDGET>,
            ),
          ),
Run Code Online (Sandbox Code Playgroud)