Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886) (#5858)
* Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886) `-[FlutterDartProject initFromDefaultSourceForConfiguration]` no longer seems very useful. It calls `-initWithPrecompiledDartBundle:` or `-initWithFlutterAssets:dartMain:packages:`, but since it now passes `nil` for all arguments, both paths end up doing the same thing. Additionally, `-initFromDefaultSourceForConfiguration` is awkward to use in Swift. The automatically generated Swift interface is: public convenience init!(fromDefaultSourceForConfiguration: ()) and it's not obvious how to call that. Let's deprecate `-initFromDefaultSourceForConfiguration` and instead expect callers to use the existing `-init` method. (We can make `-init` do different things for different build configurations later if necessary.) Bonus: Rename some parameters to make it more obvious when they may be `nil`.
Showing
想要评论请 注册 或 登录