Skip to content

[web] Implement production and test entry point embedders #33532

@yjbanov

Description

@yjbanov

On the Web we need to initialize the page for Flutter's consumption, such as load fonts, configure <meta> viewport tags, and so on. Let's call such initialization code an "embedding" of Flutter. We currently have two such embeddings:

  • Production embedding: prepares a web-page for running an app normally. This is the embedding you get when you run flutter run.
  • Test embedding: prepares a web-page for running a test. The test embedding hardcodes some things irrespective of the actual browser window, such as default to device pixel ratio of 3.0, and replace all fonts with the "Ahem" font.

We need to implement these two embeddings such that user code does not need to altered to run on the web. For example, user-written code should not call ensureTestPlatformInitializedThenRunTest, or webOnlyInitializeTestDomRenderer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions