This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[web] webOnlyWarmupEngine + js-interop APIs#32017
Merged
fluttergithubbot merged 19 commits intoflutter:mainfrom Mar 30, 2022
Merged
[web] webOnlyWarmupEngine + js-interop APIs#32017fluttergithubbot merged 19 commits intoflutter:mainfrom
fluttergithubbot merged 19 commits intoflutter:mainfrom
Conversation
ditman
commented
Mar 16, 2022
a2dd269 to
0a770b0
Compare
e1a63a8 to
9db5e50
Compare
Do not call it "legacy mode", call it "autoStart".
Member
Author
|
Let's publish the review while I write the test for the new webOnlyWarmupEngine method. |
ditman
commented
Mar 28, 2022
| import 'package:js/js.dart'; | ||
|
|
||
| /// Type-safe JS Promises | ||
| @JS('Promise') |
Member
Author
There was a problem hiding this comment.
What happens if any other code writes this same JS-interop @js('Promise')?
Contributor
There was a problem hiding this comment.
Well, there's at least this:
yjbanov
reviewed
Mar 29, 2022
yjbanov
reviewed
Mar 29, 2022
* Add unit tests for the ui.webOnlyWarmupEngine method.
* Rename AppCleaner to FlutterApp, and remove the cleanApp method.
FlutterApp API will be added later.
* Consistently name 'autoStart' everywhere in the public API.
* Remove stray 'Custom' from method name.
* Move initialization steps around so:
* webOnlyWarmupEngine only prepares and returns the AppBootstrap
object(s)
* initEngine -> initializes engine services
* runApp -> registers plugins, inits engine UI, runs app
ditman
commented
Mar 29, 2022
Member
Author
|
Rebased with main, just in case. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 30, 2022
zanderso
pushed a commit
to flutter/flutter
that referenced
this pull request
Mar 31, 2022
* cb9232b [web] webOnlyWarmupEngine + js-interop APIs (flutter/engine#32017) * 88b7f72 [macOS] Generate gen_snapshot_$arch by default (flutter/engine#32326) * 6dd43e6 Add support for images in display lists. (flutter/engine#32268) * a1106da [web] Make "felt build" wait for both engine and canvaskit builds (flutter/engine#32308)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds the new
ui.webOnlyWarmupEnginethat creates a JS-interop layer so methods from the engine can be called directly from Apps, and the initialization can be controlled by the user.See flutter/flutter#100177 to see how the framework would use this new API.
Demo
The new API above allows users to write their own (informative) splash screens, for example:
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.