直播系统代码,给标题栏添加阴影效果和圆角效果

直播系统代码,给标题栏添加阴影效果和圆角效果实现的相关代码

阴影效果

AppBar(
        title: Text('AppBarTitle'),
        backgroundColor: Colors.red,
        actions: <Widget>[
          IconButton(icon: const Icon(Icons.add),),
          IconButton(icon: const Icon(Icons.clear),),
          IconButton(icon: const Icon(Icons.arrow_drop_down),),
        ],
        elevation: 50,
)
AppBar(
        title: Text('AppBarTitle'),
        backgroundColor: Colors.red,
        actions: <Widget>[
          IconButton(icon: const Icon(Icons.add),),
          IconButton(icon: const Icon(Icons.clear),),
          IconButton(icon: const Icon(Icons.arrow_drop_down),),
        ],

​圆角效果

AppBar(
        title: Text('AppBarTitle'),
        backgroundColor: Colors.greenAccent,
        elevation: 4,
        shape: RoundedRectangleBorder(
            side: BorderSide.none,
            borderRadius: BorderRadius.only(
                bottomLeft: Radius.circular(50.0),
                bottomRight: Radius.circular(30.0))),
        actions: <Widget>[
          IconButton(
            icon: const Icon(Icons.add),
          ),
          IconButton(
            icon: const Icon(Icons.clear),
          ),
          IconButton(
            icon: const Icon(Icons.arrow_drop_down),
          ),
        ],
      )

以上就是直播系统代码,给标题栏添加阴影效果和圆角效果实现的相关代码, 更多内容欢迎关注之后的文章

 

posted @ 2022-02-10 14:09  云豹科技-苏凌霄  阅读(59)  评论(0编辑  收藏  举报