当我将标签设置为可滚动时,它将所有标签设置为中心。但是我想找到一种方法,可以将所有选项卡向左对齐。有没有办法让我将左侧的标签对齐而不是居中对齐?这是我的代码。谢谢。
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: colorPrimary,
accentColor: colorAccent,
),
home: DefaultTabController(
length: 3,
child: Scaffold(
resizeToAvoidBottomPadding: false,
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(
child: Text(sign_in),
),
Tab(
child: Text(sign_up),
),
Tab(
child: Text(reset_password),
),
],
indicatorColor: colorWhite,
isScrollable: true,
),
),
body: TabBarView(
children: [
SignIn(),
SignUp(),
ResetPassword(),
],
),
),
),
);
}
}