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.