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

fix(cat-voices): didUpdateWidget can't await async func #1680

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

LynxLynxx
Copy link
Contributor

Description

From time to time, an exception was called in didUpdateWidget:

══╡ EXCEPTION CAUGHT BY FLUTTER ╞═══════════════════════════════════════════════════════════════════
The following _Exception was thrown building _CampaignHeroSection
:
Exception: _HeroSectionState.didUpdateWidget() returned a Future.
State.didUpdateWidget() must be a void method without an `async` keyword.
Rather than awaiting on asynchronous work directly inside of didUpdateWidget, call a separate method
to do this work without awaiting it.

This pr should fix it.

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@LynxLynxx LynxLynxx self-assigned this Jan 24, 2025
@LynxLynxx LynxLynxx added review me PR is ready for review dart Pull requests that update Dart code labels Jan 24, 2025
Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 443/443}$ | ${\color{red}Fail: 0/443}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 443/443}$ | ${\color{red}Fail: 0/443}$ |

Copy link
Contributor

@dtscalac dtscalac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 443/443}$ | ${\color{red}Fail: 0/443}$ |

@LynxLynxx LynxLynxx merged commit 452bb2b into main Jan 27, 2025
40 of 42 checks passed
@LynxLynxx LynxLynxx deleted the fix/section_hero branch January 27, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dart Pull requests that update Dart code review me PR is ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants