-
Notifications
You must be signed in to change notification settings - Fork 6k
Add engine group constructor in FlutterViewConrtroller #29181
Conversation
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is correct and it makes sense, but I think we should error on the side of keeping the API as simple as possible. This convenience function is something you could just have in your project and isn't something that is required to be in the Flutter API.
@xster I know you write the issue this fixes, what do you think about this now?
xster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I think this is helpful. We should keep parity between the platforms however. There should be an Android solution as well (though I acknowledge it'll be a lot more complicated than iOS).
| * FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's | ||
| * main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the | ||
| * method is not tree-shaken by the Dart compiler. | ||
| * @param libraryURI The URI of the Dart library which contains the entrypoint method. IF nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| bundle:(nullable NSBundle*)nibBundle NS_DESIGNATED_INITIALIZER; | ||
|
|
||
| /** Initializes this FlutterViewController with the specified `FlutterEngineGroup`. | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe the ownership of the resulting FlutterEngine from this API. e.g. if you pop this view controller, the engine is permanently gone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
The Android solution will be completed soon, and we will file a PR in the next few days :) . |
b1a8771 to
2962099
Compare
…e for `FlutterViewController`
|
Close this PR and later open a new PR about this feature |
We can use like this:
List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter#72742
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.