Does anyone need to implement protocol class methods? #1149
Labels
lang-objective_c
Related to Objective C support
package:objective_c
type-enhancement
A request for a change that isn't a bug
My initial design for implementing ObjC protocols from Dart will only support instance methods. This is the use case most Dart programmers will be familiar with, analogous to implementing the methods of an interface.
But in ObjC, protocols can also contain class methods (analogous to static methods in Dart). It's possible to implement them, and for a consumer of the protocol to get the instance's class and then call the implementation of that class method:
Supporting this would be tricky, and I think that protocols with class methods are rare. So for now I'm not going to support it. Comment on this issue if you have a use case.
The text was updated successfully, but these errors were encountered: