This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[plugin_platform_interface] Add a new method
verify
that prevents u…
…se of `const Object()` as token. (#4640) - Introduce `verify`, a more future-proof name. It throws `AssertionError` if `const Object()` used as the instance's token. - Soft-deprecate `verifyToken` with a comment. It will actually deprecated in a future release, to avoid breaking tests with this minor change. - Update documentation for `PlatformInterface` to show new usage of `verify` and other cosmetic fixes. - Add a test for the new assertion. Fixes flutter/flutter#96178.
- Loading branch information
1 parent
cb381ce
commit 72634e0
Showing
4 changed files
with
109 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, switching our plugins to
verify
broke a bunch of our tests post-publish because it doesn't do ainstance is MockPlatformInterfaceMixin
before trying to access_instanceToken
, which makes MockPlatformInterfaceMixin not work forverify
.I can fix this tomorrow morning (or if you get to it first, feel free to send a PR).