Flutter之Opacity组件

/**     设置子控件透明度
    const Opacity({
    Key key,
    @required this.opacity,//透明度,0.0 到 1.0,0.0表示完全透明,1.0表示完全不透明
    this.alwaysIncludeSemantics = false,
    Widget child,
    })
 */
body: Opacity(
          opacity: 0.5,
          child: Container(
            width: 100.0,
            height: 100.0,
            margin: EdgeInsets.all(20.0),
            color: Color(0xffff0000),
          ),
        ),

码云地址:https://gitee.com/xgljh/Flutter.git

你可能感兴趣的:(Flutter之Opacity组件)