我目前正在开发一个 Flutter 应用程序,我想在其中显示TabBar左侧的开始。如果 anAppBar有一个领先的属性,我想缩进 的起始位置TabBar以匹配它。然后在滚动时,它仍然会通过而不离开白色区域。
这是我目前TabBar在中间显示 a 的代码AppBar:
AppBar(
bottom: TabBar(
isScrollable: true,
tabs: state.sortedStreets.keys.map(
(String key) => Tab(
text: key.toUpperCase(),
),
).toList(),
),
);
Run Code Online (Sandbox Code Playgroud)