对AppBar widget的用法进行一些简单的介绍。
AppBar就相当于App的Header,
想要在AppBar的左边配置某些内容的时候就用leading,
想要在AppBar的右边配置内容的时候用actions。
另外elevation可以给AppBar加阴影,可以根据UI需要进行设置。
centerTitle设置为true的话,可以使title居中。
appBar: AppBar(
title: Text('title'),
backgroundColor: Colors.red,
leading: Text('テスト'),
centerTitle: true,
elevation: 100,
actions: [
Text('1'),
Text('2')
],
),