-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix: iOS background worker #244
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #244 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 104 104
=========================================
Hits 104 104 ☔ View full report in Codecov by Sentry. |
9974ef6
to
5cbf63a
Compare
I've been testing this PR over the weekend and can confirm that it resolves the issue where widgets might not reload with new data after To better understand the issue, the sequence of actions was as follows:
In this scenario, the widget would reload, but with the previously saved data, not the one saved in step 4. I still have no idea why this is happening. My best guess is that returning |
hi @armandsLa, I have tried your solution and it works.
|
@Oleksandr32 Thank you for reporting this issue. I was calling |
@armandsLa The issue has been resolved. Thanks |
@ABausG will you be able to review and merge this PR? |
Yes sorry!! Will do it after FlutterCon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - had to read a bit about async / await works on Swift. Thanks for this. currently looking into the failing android pipeline, but I should get this landed and released this weekend!
There is an issue with how
HomeWidgetBackgroundWorker
usesasync/await
in its iOS implementation. Currently, therun
method returns immediately, before the platform channel can be initialized and the Flutter callback performed.I've refactored the
HomeWidgetBackgroundWorker
with a properasync/await
implementation. Now, therun
method will return only after the interactivity callback in Flutter has been executed.