fix cm tabs scroll action
This commit is contained in:
parent
962b5d1144
commit
64d11a9dda
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue