renderer_switcher

Last updated:

0 purchases

renderer_switcher Image
renderer_switcher Images
Add to Cart

Description:

renderer switcher

renderer_switcher #
Swap Web Renderers in a Flutter Web app at runtime.
Installation #
To use this plugin, add renderer_switcher as a dependency in your pubspec.yaml file.
Then, add this script to the top of the body in your web/index.html file.
<script type="text/javascript">
window.flutterWebRenderer = localStorage.getItem('flutterWebRenderer');
</script>
copied to clipboard
Usage #
// Returns WebRenderer.html, WebRenderer.canvaskit or WebRenderer.auto
final currentRenderer = await RendererSwitcher.getCurrentWebRenderer();

if(currentRenderer == WebRenderer.canvaskit){
// Switches web renderer to canvaskit and reloads the window.
RendererSwitcher.switchWebRenderer(WebRenderer.auto);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.