由于文档中指出操作通常在标题之后,因此您可以执行以下解决方法AppBar类,以实现此目的。
appBar: AppBar(
automaticallyImplyLeading: false,
centerTitle: true,
title: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
IconButton(
icon: Icon(Icons.home),
onPressed: null,
),
IconButton(
icon: Icon(Icons.trending_up),
onPressed: null,
),
IconButton(
icon: Icon(Icons.people_outline),
onPressed: null,
),
IconButton(
icon: Icon(Icons.person_outline),
onPressed: null,
),
IconButton(
icon: Icon(Icons.notifications_none),
onPressed: null,
),
IconButton(icon: Icon(Icons.search), onPressed: null),
IconButton(
icon: Icon(Icons.brightness_5),
onPressed: null,
),
],
)),
也许在您的情况下,考虑使用TabBar可能更合适。
centerTitle: true
。 - Vettiyanakan