-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Multiple Forms in TabView calling setState() in onChanged callback #18063
Comments
Could you provide a small test case that demonstrates this problem? |
I got the same error. I reduced my much larger code to the one below. It looks like it happens only, when the tabController has an listener, which calls setState. As soon as setState is not called anymore everything is fine. Is it a bad idea to call setState in the listener? I used it to dynamically apply a page title to the new widget in front. Reproduction of the issue
|
@MSchrenker I think your correct because I have a listener on my form that calls |
@qwezey I am not sure anymore. On my slower laptop and with an android emulator, I get the error, when there is a listener defined. There I don't need to call setState. But on the two physical devices I tried, it works fine as long setState is not called in the listener. I guess it has something to do with the tabController and its management/caching of its pages. Additionally here the flutter doctor protocoll: C:\Users\Marko>Flutter doctor --verbose [√] Android toolchain - develop for Android devices (Android SDK 27.0.3) [!] Android Studio (version 3.0) [√] Android Studio (version 3.1) [!] IntelliJ IDEA Community Edition (version 2017.2) [√] Connected devices (1 available) ! Doctor found issues in 2 categories. |
@MSchrenker that confirms the issue arises when you call |
@MSchrenker I just realized you don't have a listener on your Form, but I do on the |
Duplicate of #11895. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
This happens every time I have a dirty form on one tab, move to another tab with the same form and come back.
@MSchrenker commented a test case below to reproduce a similar issue.
The text was updated successfully, but these errors were encountered: