Skip to content

Commit 0a4d369

Browse files
authored
Allow custom CanvasKit URL (flutter#19822)
1 parent 18f3aef commit 0a4d369

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/web_ui/lib/src/engine/compositor/initialization.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ const bool canvasKitForceCpuOnly =
1717
/// When CanvasKit pushes a new release to NPM, update this URL to reflect the
1818
/// most recent version. For example, if CanvasKit releases version 0.34.0 to
1919
/// NPM, update this URL to `https://unpkg.com/[email protected]/bin/`.
20-
const String canvasKitBaseUrl = 'https://unpkg.com/[email protected]/bin/';
20+
const String canvasKitBaseUrl = String.fromEnvironment(
21+
'FLUTTER_WEB_CANVASKIT_URL',
22+
defaultValue: 'https://unpkg.com/[email protected]/bin/',
23+
);
2124

2225
/// Initialize CanvasKit.
2326
///

0 commit comments

Comments
 (0)