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

如何动态改变 TabController length #33

Open
giantss opened this issue Aug 11, 2023 · 0 comments
Open

如何动态改变 TabController length #33

giantss opened this issue Aug 11, 2023 · 0 comments

Comments

@giantss
Copy link

giantss commented Aug 11, 2023

Platforms

dart

Description

我在初始化函数里面初始化代码如下:

 tabController = TabController(
      initialIndex: idx,
      length:  arr.length, // 初始长度是4
      vsync: this,
    );

目前有这个一个需求,需要动态改变增加 TabController length的初始长度。请教一下应该如何实现。

目前尝试在逻辑中再次调用上面的代码,这次长度是8,出现报错了。

image

My code

No response

Try do it

No response

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

No branches or pull requests

2 participants