-
Notifications
You must be signed in to change notification settings - Fork 227
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
Bug: PageController.page cannot be accessed before a PageView is built with it #175
Comments
Thanks for your report. Want to send a PR? |
Adding this here to look later, maybe it'll help with the problem. https://stackoverflow.com/questions/17552757/is-there-any-way-to-cancel-a-dart-future |
@damphat can you test the PR to see if it solves your problem? |
@ghenry are you maintaining dots indicator too? |
Can do :)
…On Wed, 3 May 2023, 23:43 Gianluca Bettega, ***@***.***> wrote:
@ghenry <https://github.com/ghenry> are you maintaining dots indicator
too?
—
Reply to this email directly, view it on GitHub
<#175 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66BX623JA6HNHKWOXITXELNP5ANCNFSM6AAAAAAXRGNDVY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
gonna open a breaking change PR there |
if this update lands i'm gonna change here to int too |
The last fix does not work; it should be simple as Make sure to put the statement after the async gap.
|
It seems that we can cancel the return value, but the async code still runs |
I thought of using mounted property instead of the cancel one, but wanna try the cancel for the first time. Unfortunately it didnt work... Tks for the help! When @ghenry approves the PR this will be fixed |
Approved and merged. Just awaiting perms for pub.dev. |
is this bug not resolved yet? i still got the same bug in version 3.1.9 |
@Macacoazul01 The bug has reappeared in the implementation of f25bbbd#diff-b01e1c7007799dbc6e79576c5c970152638818840b6e2e6e630f352ee545321c |
Describe the bug
When the IntroductionScreen has been disposed, the async method
_autoScroll(int? _durationInt)
continues to run asynchronously.That causes an Exception has occurred.
_AssertionError ('package:flutter/src/widgets/page_view.dart': Failed assertion: line 173 pos 7: 'positions.isNotEmpty': PageController.page cannot be accessed before a PageView is built with it.)
To Reproduce
Run the example of this package with
pushReplacement()
andshowSkipButton = true
:To fix this issues
_autoScroll process
must be canceled indispose()
The text was updated successfully, but these errors were encountered: