Skip to content

-initFromDefaultSourceForConfiguration for FlutterDartProject is awkward to use from Swift #18886

@jamesderlin

Description

@jamesderlin

The -initFromDefaultSourceForConfiguration initializer for FlutterDartProject is awkward to use in Swift code because the automatically generated interface is:

public convenience init!(fromDefaultSourceForConfiguration: ())

Looking at it, it's not even obvious how to call it. (Spoiler: FlutterDartProject(fromDefaultSourceForConfiguration: ()))

I am by no means fluent with Swift, but my understanding is that this is a rather unusual construct.

It probably would be better if FlutterDartProject provided a bare -init method that does the same thing. If it's important for the fromDefaultSourceForConfiguration part to be emphasized in the name, perhaps a class factory method could be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions