-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
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'),
),
],
),
),
],
),
),
),
),
);
}
} |
I've been using the SegmentedTabControl widget and encountered some issues related to RTL support: 1- Swiping Direction Reversal: Even when using TabController.initialIndex to set the initial selected tab in RTL mode, the swiping direction remains inconsistent. Users expect to swipe left to move to the previous tab and right to move to the next tab, regardless of the reading direction. 2- Tab Press Functionality: Additionally, the tab press functionality can be unpredictable in RTL mode. Pressing a tab might result in selecting an unexpected tab due to the reversed layout. i've already created a PR for this issue |
No description provided.
The text was updated successfully, but these errors were encountered: