fix cm tabs scroll action
This commit is contained in:
parent
962b5d1144
commit
64d11a9dda
@ -127,12 +127,12 @@ class DesktopTabController {
|
||||
if (!isDesktop || index < 0) return;
|
||||
state.update((val) {
|
||||
val!.selected = index;
|
||||
Future.delayed(Duration.zero, (() {
|
||||
Future.delayed(Duration(milliseconds: 100), (() {
|
||||
if (val.pageController.hasClients) {
|
||||
val.pageController.jumpToPage(index);
|
||||
}
|
||||
val.scrollController.itemCount = val.tabs.length;
|
||||
if (val.scrollController.hasClients &&
|
||||
val.scrollController.canScroll &&
|
||||
val.scrollController.itemCount > index) {
|
||||
val.scrollController
|
||||
.scrollToItem(index, center: false, animate: true);
|
||||
|
Loading…
Reference in New Issue
Block a user