Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL Support #10

Closed
aminsamad opened this issue Jul 25, 2022 · 1 comment
Closed

RTL Support #10

aminsamad opened this issue Jul 25, 2022 · 1 comment

Comments

@aminsamad
Copy link

No description provided.

@SviatManiuk
Copy link
Contributor

Hello!

After careful consideration, we have decided not to add RTL support. The same behavior can be achieved using the TabController.initialIndex property:

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: DefaultTabController(
        length: 3,
        initialIndex: 2,
        child: Scaffold(
          body: SafeArea(
            child: Stack(
              children: [
                SegmentedTabControl(
                  height: 46,
                  tabs: [
                    SegmentTab(
                      label: 'LIBRARY[',
                    ),
                    SegmentTab(
                      label: 'ACCOUNT',
                    ),
                    SegmentTab(
                      label: 'HOME',
                    ),
                  ],
                ),
                Padding(
                  padding: EdgeInsets.only(top: 46),
                  child: TabBarView(
                    physics: BouncingScrollPhysics(),
                    children: [
                      Center(
                        child: Text('LIBRARY PAGE'),
                      ),
                      Center(
                        child: Text('ACCOUNT PAGE'),
                      ),
                      Center(
                        child: Text('HOME PAGE'),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants