-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Adds a type parameter to invokeMethod (and additional utility methods) #26303
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
Conversation
This file contains hidden or 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
Contributor
Author
|
I guess @optionalTypeArguments isnt that optional |
Hixie
reviewed
Jan 9, 2019
Hixie
reviewed
Jan 9, 2019
Contributor
jonahwilliams
pushed a commit
to jonahwilliams/flutter
that referenced
this pull request
Jan 11, 2019
Closed
amirh
added a commit
to amirh/plugins
that referenced
this pull request
Jan 11, 2019
flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
amirh
added a commit
to amirh/plugins
that referenced
this pull request
Jan 11, 2019
flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
amirh
added a commit
to flutter/plugins
that referenced
this pull request
Jan 12, 2019
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
kangwang1988
pushed a commit
to XianyuTech/flutter
that referenced
this pull request
Feb 12, 2019
andreidiaconu
pushed a commit
to andreidiaconu/plugins
that referenced
this pull request
Feb 17, 2019
…s. (flutter#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
collinjackson
pushed a commit
to collinjackson/flutterfire-old2
that referenced
this pull request
Jun 24, 2019
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
collinjackson
pushed a commit
to firebase/flutterfire
that referenced
this pull request
Aug 14, 2019
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
g123k
pushed a commit
to g123k/flutter_android_intent_with_parts
that referenced
this pull request
Sep 4, 2019
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
Akachu
pushed a commit
to Akachu/firebase_auth
that referenced
this pull request
Sep 16, 2019
…s. (firebase#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
ryanheise
pushed a commit
to ryanheise/background_video_player
that referenced
this pull request
Sep 29, 2019
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
nksteven
pushed a commit
to nksteven/ntf-firebase_messaging
that referenced
this pull request
Apr 8, 2020
…s. (#1065) flutter/flutter#26303 added a template argument to `invokeMethod`, which triggers the `strong_mode_implicit_dynamic_method` analyzer warning in many call sites in the plugins repo. We should add the type parameter to all these call sites, but we can only do that after bumping the Flutter dependency constraint which we will only do once the `invokeMethod` change makes it to the stable release. For now we're suppressing the warning in all call sites (we're not disabling the lint wholesale as we still want it for the rest of the code) See: flutter/flutter#26431
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
c: contributor-productivity
Team-specific productivity, code health, technical debt.
framework
flutter/packages/flutter repository. See also f: labels.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #17333
This adds a type parameter T to the
invokeMethodmethod, which allows it to automatically return a properly typed Future instead of requiring a manual cast. Also addsinvokeListMethodandinvokeMapMethodutilities for Lists and Maps, respectively. Due to the reified nature of Dart generics, it is not possible to cast a Future, List, or Map without creating a new wrapper.Before:
After:
Additionally, I've added two utility methods to help with returning Maps and List (which have similar issues):
Before:
After: