-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize Flutter bootstrap code #2969
Conversation
I would love to see PR merged. At the moment, |
This is a workaround until dart-lang#2969 is merged
@daohoangson Could you provide more details on the issue you're seeing or where? I don't believe |
Sorry for not being clear, I have been maintaining my own version of DartPad with additional packages. The build starts failing after adding The plugin tries to get the asset manager: _assetManager = assetManagerMock ?? assetManager; The getter looks like this: AssetManager get assetManager => engineAssetManager; It calls another getter: ui_web.AssetManager get engineAssetManager => _debugAssetManager ?? _assetManager!; Because |
await ui_web.bootstrapEngine( | ||
runApp: () { | ||
return entrypoint.main(); | ||
entrypoint.main(); |
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.
👍
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.
What does this change do?
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.
@johnpryan fixes #2966
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.
Got it... We might not need to maintain this code any more. The comment above is old and out of date since flutter/flutter#144434 landed and we integrated the new bootstrapping (#2960)
Do we even need to call |
@johnpryan I don't remember dartpad code very well, but I think the new bootstrapping code is NOT generating the actual main.dart file that contains the That generated file is the thing that glues the framework + engine + plugins + user code, so users only have to worry about writing the latter. |
Closes #2966