-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
FCPListItem completeHandler is null and won't run properly #17
Comments
Ah alright. Yesterday I created a ticket with the full investigation: #23 I will close that issue and add the info here. |
Add an
And you will see this behaviour. Screen.Recording.2022-09-14.at.14.36.04.movI did some research. Turns out there is a major bug in the
I added some logs. And these are the logs I got:
I also added a log to the Turns out that the Workaround Just don't select anything for some time. (couple of seconds +/-10 - 20) And you will be able to select another item. (The spinner will stay there as long as you don't call the |
I found another workaround for this bug: |
Is it possible to provide with this code? or create a draft pull request so we can also use it? |
I'm sorry the code is a bit more complicated behind the scenes and I haven't modified the package at all, it is just in app, but I'll try my best to summarize it in order to help with the workaround, but again, the last page won't resume in its last position/state because you are overwriting the page everytime with FlutterCarplay.setRootTemplate.
|
Hmm alright. Today I will be looking at the |
…igger the completion handler as well
We fixed the issue in #26 |
#26 also contains the now playing implementation |
From remote-tracking branch 'icapps/bugfix/oguzhnatly#17-completion-handler-not-finished' MR in the main repo: oguzhnatly#26 icapps source branch: https://github.com/icapps/flutter_carplay/tree/bugfix/%2317-completion-handler-not-finished,
There seems to be a problem with the loading wheel beeing infinite and list items not updating properly when list items are used in a push template through FlutterCarplay.push().
The main reason this appears seems to be that completeHandler becomes null immediately after the onPress event is fired and stopHandler from FCPListItem.swift won't finish properly.
Is there any way to make sure that completeHandler won't become null until stopHandler is called?
In order to reproduce you just have to put
CPListItem(text: "Item 1",
onPress: (complete, self) {
print("BUTTON " + self.text);
complete();
}),
insted of
CPListItem(text: "Item 1"}),
on line 313 of the main.dart file in the example folder and click that item.The text was updated successfully, but these errors were encountered: