- 12 Mar, 2024 1 commit
-
-
Jackson Gardner authored
This makes several changes to flutter web app bootstrapping. * The build now produces a `flutter_bootstrap.js` file. * By default, this file does the basic streamlined startup of a flutter app with the service worker settings and no user configuration. * The user can also put a `flutter_bootstrap.js` file in the `web` subdirectory in the project directory which can have whatever custom bootstrapping logic they'd like to write instead. This file is also templated, and can use any of the tokens that can be used with the `index.html` (with the exception of `{{flutter_bootstrap_js}}`, see below). * Introduced a few new templating tokens for `index.html`: * `{{flutter_js}}` => inlines the entirety of `flutter.js` * `{{flutter_service_worker_version}}` => replaced directly by the service worker version. This can be used instead of the script that sets the `serviceWorkerVersion` local variable that we used to have by default. * `{{flutter_bootstrap_js}}` => inlines the entirety of `flutter_bootstrap.js` (this token obviously doesn't apply to `flutter_bootstrap.js` itself). * Changed `IndexHtml` to be called `WebTemplate` instead, since it is used for more than just the index.html now. * We now emit warnings at build time for certain deprecated flows: * Warn on the old service worker version pattern (i.e.`(const|var) serviceWorkerVersion = null`) and recommends using `{{flutter_service_worker_version}}` token instead * Warn on use of `FlutterLoader.loadEntrypoint` and recommend using `FlutterLoader.load` instead * Warn on manual loading of `flutter_service_worker.js`. * The default `index.html` on `flutter create` now uses an async script tag with `flutter_bootstrap.js`.
-
- 09 Feb, 2024 1 commit
-
-
Polina Cherkasova authored
-
- 15 Dec, 2023 1 commit
-
-
Srujan Gaddam authored
Pinning the package:web dependency constrains downstream packages from using newer versions and making sure they support the version pinned in Flutter. Since the usage of package:web in Flutter is light, we should instead have a small shim like the engine and keep package:web as a dev dependency only.
-
- 15 Nov, 2023 1 commit
-
-
Srujan Gaddam authored
This version is needed so that dart:js_interop can move to extension types. Also adds some code to handle some breaking changes: - Body -> Response. Body was an IDL interface mixin type we exposed in dart:html. Going forward, users should either use Request or Response. - Casts to JSAny. These are temporary until we move package:web types to extension types. Currently, package:web types can't implement JSObject as JSObject will move to be an extension type itself. Co-authored-by:
Kevin Moore <kevmoo@users.noreply.github.com>
-
- 27 Oct, 2023 1 commit
-
-
David Iglesias authored
## Description This PR adds a `nonce` parameter to flutter.js' `loadEntrypoint` method. When set, loadEntrypoint will add a `nonce` attribute to the `main.dart.js` script tag, which allows Flutter to run in environments slightly more restricted by CSP; those that don't add `'self'` as a valid source for `script-src`. ---- ### CSP directive After this change, the CSP directive for a Flutter Web index.html can be: ``` script-src 'nonce-YOUR_NONCE_VALUE' 'wasm-unsafe-eval'; font-src https://fonts.gstatic.com; style-src 'nonce-YOUR_NONCE_VALUE'; ``` When CSP is set via a `meta` tag (like in the test accompanying this change), and to use a service worker, the CSP needs an additional directive: [`worker-src 'self';`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src) When CSP set via response headers, the CSP that applies to `flutter_service_worker.js` is determined by its response headers. See **Web Workers API > [Content security policy](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#content_security_policy)** in MDN.) ---- ### Initialization If the CSP is set to disallow `script-src 'self'`, a nonce needs to also be passed to `loadEntrypoint`: ```javascript _flutter.loader.loadEntrypoint({ nonce: 'SOME_NONCE', onEntrypointLoaded: (engineInitializer) async { const appRunner = await engineInitializer.initializeEngine({ nonce: 'SOME_NONCE', }); appRunner.runApp(); }, }); ``` (`nonce` shows twice for now, because the entrypoint loader script doesn't have direct access to the `initializeEngine` call.) ---- ## Tests * Added a smoke test to ensure an app configured as described above starts. ## Issues * Fixes https://github.com/flutter/flutter/issues/126977
-
- 11 Oct, 2023 1 commit
-
-
Kevin Moore authored
* Allow latest pkg:material_color_utilities * Bump other dependencies to their latest - including pkg:web
-
- 29 Sep, 2023 1 commit
-
-
Polina Cherkasova authored
Fixes: https://github.com/flutter/flutter/issues/135716 leak_tracker is left pinned because future updates are going to be breaking.
-
- 20 Sep, 2023 2 commits
-
-
David Iglesias authored
This PR is the result of running: ```console $ flutter upgrade-packages --force-upgrade ``` ### Issues * Fixes https://github.com/flutter/flutter/issues/135075 * Supersedes #135081
-
Gray Mackall authored
More up to date version of https://github.com/flutter/flutter/pull/133786. Fixes https://github.com/flutter/flutter/issues/111304
-
- 14 Sep, 2023 1 commit
-
-
Pavel Mazhnik authored
Fixes https://github.com/flutter/flutter/issues/130212 Fix `Unresolved variable or type 'serviceWorkerVersion'` in the `_getNewServiceWorker` function. Supersedes https://github.com/flutter/flutter/pull/130206
-
- 12 Sep, 2023 1 commit
-
-
Michael Goderbauer authored
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2. Part of https://github.com/flutter/flutter/issues/134476.
-
- 27 Jul, 2023 1 commit
-
-
Jason Simmons authored
Dart SDK 3.2.x requires a new version of the dart_internal package.
-
- 15 Jun, 2023 1 commit
-
-
Mouad Debbar authored
- Bumps `vm_service` from `11.6.0` to `11.7.1` - Bumps `web` from `0.1.3-beta` to `0.1.4-beta` and adds it everywhere. - Moves `js` from `dependencies` to `dev_dependencies`
-
- 16 May, 2023 1 commit
-
- 08 May, 2023 1 commit
-
-
Pierre-Louis authored
In particular, update pin for `material_color_utilities` to `0.5.0`.
-
- 10 Apr, 2023 1 commit
-
-
Eilidh Southren authored
Update MCU version
-
- 24 Mar, 2023 1 commit
-
-
Harry Terkelsen authored
-
- 23 Mar, 2023 1 commit
-
-
Flutter GitHub Bot authored
Roll pub packages
-
- 21 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Bump lower Dart SDK constraints to 3.0 & add class modifiers
-
- 23 Feb, 2023 1 commit
-
-
Flutter GitHub Bot authored
-
- 02 Feb, 2023 2 commits
-
-
Christopher Fujino authored
* roll packages * fix dwds * empty --------- Co-authored-by:
fluttergithubbot <fluttergithubbot@gmail.com>
-
Michael Goderbauer authored
* Make Flex,Row,Column const for real * dart fix --apply * fix snippets * fix integration test * add comment
-
- 27 Jan, 2023 1 commit
-
-
Danny Tuppeny authored
-
- 10 Jan, 2023 1 commit
-
-
Jonah Williams authored
-
- 20 Dec, 2022 5 commits
-
-
Michael Goderbauer authored
-
Flutter GitHub Bot authored
-
Zachary Anderson authored
Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (#117396) This reverts commit 61fb6ea2.
-
Siva authored
-
Michael Goderbauer authored
* Bump min SDK to 2.19.0-0 * fix
-
- 09 Dec, 2022 1 commit
-
-
Siva authored
* Roll Flutter Engine from 67254d6e4b03 to 8d83b98c55b3 * Roll Dart SDK from 35a9facce191 to e517487c5679 (Dart 3.0) (#38105) * Bump SDK versions. * Bump Dart SDK version constraints * Update shrine package to 2.0.1 (null safe version) * Fix more tests. * Include patches from Jason for min android sdk version * Fix analyzer warning
-
- 21 Oct, 2022 2 commits
-
-
Flutter GitHub Bot authored
-
David Iglesias authored
-
- 20 Oct, 2022 1 commit
-
-
Flutter GitHub Bot authored
-
- 29 Sep, 2022 1 commit
-
-
joshualitt authored
-
- 23 Sep, 2022 1 commit
-
-
Casey Hillers authored
-
- 22 Sep, 2022 1 commit
-
-
Flutter GitHub Bot authored
-
- 19 Sep, 2022 1 commit
-
-
joshualitt authored
-
- 25 Aug, 2022 2 commits
-
-
Yegor authored
-
Christopher Fujino authored
-
- 05 Aug, 2022 1 commit
-
-
Pierre-Louis authored
In particular, to get `material_color_utilities` `0.2.0`.
-