Skip to content

[xdg_directories] Migrate xdg_directories to nnbd #275

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 3 commits into from
Jan 28, 2021
Merged

[xdg_directories] Migrate xdg_directories to nnbd #275

merged 3 commits into from
Jan 28, 2021

Conversation

yash1200
Copy link
Contributor

@yash1200 yash1200 commented Jan 28, 2021

This PR migrates xdg_directories package to null safety.

Fixes

Related PR

Pre-launch Checklist

  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • 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.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@yash1200
Copy link
Contributor Author

@stuartmorgan How can i write test for this check you referenced here #250 (comment)

@stuartmorgan-g stuartmorgan-g self-requested a review January 28, 2021 14:00
@stuartmorgan-g
Copy link
Contributor

@stuartmorgan How can i write test for this check you referenced here #250 (comment)

https://api.flutter.dev/flutter/package-matcher_matcher/isNotNull-constant.html

@yash1200
Copy link
Contributor Author

@stuartmorgan
Do you mean something like this?

expect(xdg.runtimeDir, isNotNull);
expect(xdg.runtimeDir!.path, equals(testPath('.local/test_runtime')));

@stuartmorgan-g
Copy link
Contributor

Yes, that should be fine. (I was thinking that you'd need to wrap the second line in a null check, but it looks like unlike C++ gtest expectations, failures in Dart's expect immediately kill the test.)

@yash1200
Copy link
Contributor Author

Done the requried changes
@stuartmorgan

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@stuartmorgan-g stuartmorgan-g merged commit 796fb1b into flutter:master Jan 28, 2021
@yash1200 yash1200 deleted the xdgg branch January 29, 2021 16:53
stuartmorgan-g pushed a commit to stuartmorgan-g/packages that referenced this pull request Apr 30, 2021
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.

2 participants