Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 941f268fc8bb
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5b9d2132b7cd
Choose a head ref
  • 1 commit
  • 33 files changed
  • 1 contributor

Commits on Jan 10, 2024

  1. Refactor flutter.js to do dart2wasm bootstrapping and CanvasKit/Skwas…

    …m preloading. (#49037)
    
    This PR makes some major revisions to our flutter.js bootstrapper.
    * Modularize flutter.js into multiple files to make it a little simpler to manage from source code. They are still bundled into a single .js file by esbuild.
    * Added a `types.d.ts` file which contains declarations of the types of some of the objects used in the flutter.js API
    * Deprecated the old `FlutterLoader.loadEntrypoint` API and added a new function simply called `FlutterLoader.load`, which has a few more capabilities:
      -  A build tool can inject a build config, that may describe multiple builds that `FlutterLoader.load` can attempt to use. It will use the first one that is compatible with the browser environment and the user's configuration.
      - It can also load wasm flutter apps.
      - It also pre-loads and instantiates CanvasKit (and Skwasm) as necessary depending on the build configuration.
      - `FlutterLoader.load` also immediately takes a flutter configuration object. If an `onEntrypointLoaded` callback is not provided by the user, it just does the expected thing and initializes the engine and immediately starts the app, passing the configuration along as needed.
     * `flutter.js` has the engine hash built into it now, which allows it to ascertain the correct CDN URLs for both CanvasKit and Skwasm.
    eyebrowsoffire authored Jan 10, 2024
    Configuration menu
    Copy the full SHA
    5b9d213 View commit details
    Browse the repository at this point in the history
Loading