• J
    Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886) (#5858) · d06e9e84
    James D. Lin 提交于
    * 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`.
    d06e9e84
FlutterViewController.h 1.9 KB