-
Notifications
You must be signed in to change notification settings - Fork 1.7k
code in flutter/flutter code base needs to be cleaned up to use 'void' instead of 'Null' as a generic parameter #31869
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
Comments
This may require some progress on #30177 , in that if you try to land code that uses void as a type argument you get analyzer errors until support lands. |
Here is a non-exausitive list of places that need an update: [warning] The argument type '(bool) → void' can't be assigned to the parameter type '(bool) → FutureOr<Null>'. (examples/stocks/lib/stock_settings.dart, line 88, col 22)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter_test/lib/src/binding.dart, line 453, col 31)
[warning] The argument type '(Codec) → void' can't be assigned to the parameter type '(Codec) → FutureOr<Null>'. (packages/flutter/lib/src/painting/image_stream.dart, line 336, col 22)
[warning] The argument type '(ImageInfo) → void' can't be assigned to the parameter type '(ImageInfo) → FutureOr<Null>'. (packages/flutter/lib/src/painting/image_stream.dart, line 273, col 22)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/scale.dart, line 203, col 41)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/scale.dart, line 233, col 40)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/scale.dart, line 205, col 41)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/scale.dart, line 239, col 39)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/long_press.dart, line 29, col 43)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 356, col 41)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 197, col 43)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 376, col 43)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 385, col 37)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 391, col 45)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/multitap.dart, line 383, col 39)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 123, col 40)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 216, col 39)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 169, col 41)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 209, col 39)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 175, col 42)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 196, col 42)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/monodrag.dart, line 143, col 44)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/tap.dart, line 106, col 57)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/tap.dart, line 161, col 39)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/lib/src/gestures/tap.dart, line 134, col 52)
[warning] The argument type '(ImageInfo) → void' can't be assigned to the parameter type '(ImageInfo) → FutureOr<Null>'. (packages/flutter/test/widgets/image_resolution_test.dart, line 93, col 22)
[warning] The argument type '() → void' can't be assigned to the parameter type '() → Null'. (packages/flutter/test/foundation/capture_output.dart, line 11, col 18) |
The above quoted to render the generic types :
|
@a-siva I wanted to move forward with Gallery so I cleaned up enough places to make it run (once we have support from all components), see flutter/flutter#14107 |
The PR has landed in flutter/flutter, closing this issue. |
Flutter has code of the form
which leads to runtime errors in strong mode.
All this code needs to be converted to use
(please see issue #31858 for more details).
The text was updated successfully, but these errors were encountered: