You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow-up to the discussion in #1580 and the changes there: getting a selector is now public, but the type it returns is not; as a client of objective_c, the type returned by toSelector() is Pointer<_ObjCSelector>. This has some very problematic properties, including:
I cannot declare a variable that stores a selector that is fully typed, which in turn means I cannot declare such a variable in flutter/packages (or flutter/flutter) without an // ignore directive.
I cannot mock any generated objects in unit tests without a bunch of extra work due to errors like:
Invalid @GenerateMocks annotation: Mockito cannot generate a valid mock class which implements 'NSBundle' for the following reasons:
The method 'NSObject.doesNotRecognizeSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.forwardingTargetForSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.methodForSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.methodSignatureForSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.performSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.performSelector_withObject_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.performSelector_withObject_withObject_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The method 'NSObject.respondsToSelector_' features a private type argument, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
The text was updated successfully, but these errors were encountered:
As a follow-up to the discussion in #1580 and the changes there: getting a selector is now public, but the type it returns is not; as a client of
objective_c
, the type returned bytoSelector()
isPointer<_ObjCSelector>
. This has some very problematic properties, including:flutter/packages
(orflutter/flutter
) without an// ignore
directive.The text was updated successfully, but these errors were encountered: