0

When i set my tabs to scrollable, it will set all my tabs to the center. But i want to find a way that i can align all the tabs to the left. Is there a way for me align the tabs on the left instead of center? Here is my code. Thank you.

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(),
            ],
          ),
        ),
      ),
    );
  }
}
MRu
  • 1,225
  • 7
  • 20
  • 44

1 Answers1

0

For those who are interested, this is the answer that works form me

MRu
  • 1,225
  • 7
  • 20
  • 44