forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[google_sign_in/google_identity_services] Clear-up documentation of c…
…allbacks in various APIs and uses of those APIs (flutter#8029) These APIs used to accept allowInterop'd callbacks. When the implementation was migrated to use dart:js_interop, they were wrapped with toJS. However, starting in 3.5, to be consistent with dart2wasm, double-wrapping a function is an error. The documentation should be clear that it accepts only Dart functions and uses should be cleaned up to not use allowInterop and type the callbacks' parameter and return value correctly.
- Loading branch information
Showing
9 changed files
with
25 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,15 +26,15 @@ void main() async { | |
testWidgets('TokenClientConfig', (_) async { | ||
final TokenClientConfig config = TokenClientConfig( | ||
client_id: 'testing_1-2-3', | ||
callback: (_) {}, | ||
callback: (TokenResponse _) {}, | ||
scope: <String>['one', 'two', 'three'], | ||
include_granted_scopes: true, | ||
prompt: 'some-prompt', | ||
enable_granular_consent: true, | ||
login_hint: '[email protected]', | ||
hd: 'hd_value', | ||
state: 'some-state', | ||
error_callback: (_) {}, | ||
error_callback: (GoogleIdentityServicesError? _) {}, | ||
); | ||
|
||
final utils.ExpectConfigValueFn expectConfigValue = | ||
|
@@ -79,14 +79,14 @@ void main() async { | |
scope: <String>['one', 'two', 'three'], | ||
include_granted_scopes: true, | ||
redirect_uri: Uri.parse('https://www.example.com/login'), | ||
callback: (_) {}, | ||
callback: (CodeResponse _) {}, | ||
state: 'some-state', | ||
enable_granular_consent: true, | ||
login_hint: '[email protected]', | ||
hd: 'hd_value', | ||
ux_mode: UxMode.popup, | ||
select_account: true, | ||
error_callback: (_) {}, | ||
error_callback: (GoogleIdentityServicesError? _) {}, | ||
); | ||
|
||
final utils.ExpectConfigValueFn expectConfigValue = | ||
|
@@ -110,7 +110,7 @@ void main() async { | |
testWidgets('returns a tokenClient', (_) async { | ||
final TokenClient client = oauth2.initTokenClient(TokenClientConfig( | ||
client_id: 'for-tests', | ||
callback: (_) {}, | ||
callback: (TokenResponse _) {}, | ||
scope: <String>['some_scope', 'for_tests', 'not_real'], | ||
)); | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 0.12.4+3 | ||
|
||
* Fixes callback types for `TokenClientConfig`. | ||
|
||
## 0.12.4+2 | ||
|
||
* Adds support for `web: ^1.0.0`. | ||
|
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