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!: Updates for Flutter 3.16.0/Dart 3.2 #65

Merged
merged 6 commits into from
Nov 22, 2023

Conversation

Tregan
Copy link
Contributor

@Tregan Tregan commented Nov 17, 2023

Status

READY

Description

  • MockNavigator constructor now contains initialCanPop (default false), which is used to stub Navigator.canPop() automatically; it can ofcourse be overridden afterwards by stubbing again
  • Fixed _MockMaterialPageRoute.hackOverlays() by creating a _MockOverlayState class that allows overriding of OverlayState.mounted

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@Tregan Tregan requested a review from a team as a code owner November 17, 2023 15:58
@tomarra
Copy link
Contributor

tomarra commented Nov 17, 2023

If were making these changes, can we also get the pubspec updated to >= 3.16.0 just to make sure we don't run into other issues later on?

@Tregan Tregan changed the title Updates for Flutter 3.16.0/Dart 3.2 fix: Updates for Flutter 3.16.0/Dart 3.2 Nov 17, 2023
@alestiago alestiago self-assigned this Nov 17, 2023
@rodrigobastosv
Copy link

Can we merge this? I can't update project Flutter version because of this.

Thanks a lot!

@Tregan
Copy link
Contributor Author

Tregan commented Nov 22, 2023

Can we merge this? I can't update project Flutter version because of this.

Thanks a lot!

You can temporarily override your dependency:

  mockingjay:
    git: https://github.com/Tregan/mockingjay

@jeroen-meijer
Copy link
Contributor

Is there a particular reason other than convenience that canPop is stubbed by default?

I'd rather have an error during my test telling me I haven't mocked that method, rather than looking for a default that's hard to find.

Other than that, I'm okay with the changes. Thanks for the contribution!

@alestiago alestiago added the waiting for response Waiting for follow up label Nov 22, 2023
@Tregan
Copy link
Contributor Author

Tregan commented Nov 22, 2023

Is there a particular reason other than convenience that canPop is stubbed by default?

I'd rather have an error during my test telling me I haven't mocked that method, rather than looking for a default that's hard to find.

Other than that, I'm okay with the changes. Thanks for the contribution!

Nope, just for convenience since it will have to be stubbed for every MockNavigator. I'll take it out and update the tests.
Maybe the docs hould be updated as well?

@alestiago alestiago removed the waiting for response Waiting for follow up label Nov 22, 2023
@jeroen-meijer
Copy link
Contributor

Sounds good. If that's fixed then I think we're good to go on this one.

Copy link
Contributor

@alestiago alestiago left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for the contribution 💙 !

We'll update the README and any other documentation in a separate Pull Request.

@alestiago alestiago merged commit 8623c5c into VeryGoodOpenSource:main Nov 22, 2023
6 checks passed
@alestiago alestiago changed the title fix: Updates for Flutter 3.16.0/Dart 3.2 fix!: Updates for Flutter 3.16.0/Dart 3.2 Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants