这是indexloc提供的服务,不要输入任何密码
Skip to content

fix _owner nullability in routers.dart #84840

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

Merged
merged 10 commits into from
Jul 20, 2021
Merged

fix _owner nullability in routers.dart #84840

merged 10 commits into from
Jul 20, 2021

Conversation

TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jun 18, 2021

fixes #84769

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Jun 18, 2021
@google-cla google-cla bot added the cla: yes label Jun 18, 2021
@TahaTesser TahaTesser changed the title fix _owner nullability in the remove() in routers.dart fix _owner nullability in routers.dart Jun 18, 2021
@TahaTesser TahaTesser changed the title fix _owner nullability in routers.dart fix _owner nullability in routers.dart Jun 18, 2021
@Piinks Piinks added f: routes Navigator, Router, and related APIs. a: null-safety Support for Dart's null safety feature labels Jun 23, 2021
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Hi @TahaTesser thanks for the fix! This should have a test. Also, can you rebase your branch? That should resolve the failing checks from an infra issue.

@Piinks
Copy link
Contributor

Piinks commented Jun 30, 2021

(triage) Would you like to continue with this change @TahaTesser ?

@TahaTesser
Copy link
Member Author

@Piinks
Thanks for the review, I would love to make the changes soon)

@TahaTesser
Copy link
Member Author

@Piinks
Apologies for the delay, I had other commitments,
I have added a test and widget class for the test and rebased the branch
If the _owner is not nullable in remove() - test fails (as expected) and _owner is nullable - test passes (as expected) as the change here is to make _owner nullable.

Thank you so much for the review

@TahaTesser TahaTesser requested a review from Piinks July 13, 2021 18:55
@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 8.
View them at https://flutter-gold.skia.org/cl/github/84840

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #84840 at sha e9840ad

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jul 13, 2021
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM after nits are resolved.


await tester.pump();
Copy link
Member

Choose a reason for hiding this comment

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

nit: revert this change here? This line belongs to the comment above and there shouldn't be a blank line in between.

@@ -1712,6 +1712,25 @@ void main() {
await tester.pump();
expect(tester.takeException(), null);
});
testWidgets('child with no local history can be disposed', (WidgetTester tester) async {
Copy link
Member

Choose a reason for hiding this comment

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

nit: add a blank line before this one.

final WidgetWithNoLocalHistoryState state = tester.state(find.byType(WidgetWithNoLocalHistory));
state.addLocalHistory();
// Waits for modal route to update its internal state;

Copy link
Member

Choose a reason for hiding this comment

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

nit: remove this blank line or place it before the comment

@TahaTesser
Copy link
Member Author

@goderbauer
Thanks so much for the review,, made the changes 444045b

@TahaTesser TahaTesser requested a review from goderbauer July 18, 2021 20:23
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@goderbauer goderbauer merged commit 89c8616 into flutter:master Jul 20, 2021
@TahaTesser TahaTesser deleted the fix_owner_nullability branch July 20, 2021 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: null-safety Support for Dart's null safety feature f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null check operator used on a null value fromroutes.dart
4 participants