Skip to content

Add canvaskit_base_url parameter to flet.app() for custom CanvasKit hosting #2022

@david-shu

Description

@david-shu

The canvasKitBaseUrl specifies the download address for canvaskit.js. From main.dart.js, it can be seen that the default parameters passed in are similar to {renderer: 'canvaskite', useColorEmoji: false}, as there is no canvasKitBaseUrl in it, so the default address is used https://www.gstatic.com/flutter-canvaskit/ Due to network reasons, such as being deployed on an intranet, it may not be possible to load canvaskit.js and canvas.wasm, resulting in the inability to use the flex program properly.

Therefore, if canvaskitBaseUrl can be passed to the app function like useColorEmoji, or directly set to asset_ Dir allows users to set their own settings based on network conditions.

This paragraph is machine translated

Metadata

Metadata

Assignees

Labels

P3Issues that we currently consider unimportantfeature requestSuggestion/Request for additional featureplatform: webSpecific to the web platform

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions