flutter appbar leading 宽度不能控制

用title布局

return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.white,
        elevation: 0,
        titleSpacing: 0.0,//title widget两边不留间隙
        title: Container(
          color: Colors.red,
          child: ListTile(
            title: Text('左侧按钮自定义'),
          )
        ),
        actions: [
          FlatButton(onPressed: (){}, child: Icon(Icons.phone_in_talk))
        ],
      ),
    );

你可能感兴趣的:(flutter appbar leading 宽度不能控制)