-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Labels
Milestone
Description
While migrating plugin code from native to Dart, at one intermediate stage I had this:
- (instancetype)initWithPlayerItem:(AVPlayerItem *)item
viewProvider:(id<FVPViewProvider>)viewProvider
AVFactory:(id<FVPAVFactory>)avFactory
displayLinkFactory:(id<FVPDisplayLinkFactory>)displayLinkFactory;which was turned into:
FVPVideoPlayer initWithPlayerItem_viewProvider_AVFactory_displayLinkFactory_(
AVPlayerItem item,
objc.ObjCObjectBase viewProvider,
objc.ObjCObjectBase avFactory,
objc.ObjCObjectBase displayLinkFactory)Without any of the protocols in the types, it's incredibly easy to call incorrectly, and also much less self-documenting. Ideally Obj-C protocols would be reflected as Dart abstract interfaces that are implements'd.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done