From d8a96120e7b865d8825c4b96bd600b6663be45d9 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Wed, 13 Nov 2024 19:40:52 +0100 Subject: [PATCH] fix: widget snapshots not working properly with WASM --- .../lib/src/widget_snapshot/widget_snapshotter_web.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/super_native_extensions/lib/src/widget_snapshot/widget_snapshotter_web.dart b/super_native_extensions/lib/src/widget_snapshot/widget_snapshotter_web.dart index bc76a5ad..6cf640ba 100644 --- a/super_native_extensions/lib/src/widget_snapshot/widget_snapshotter_web.dart +++ b/super_native_extensions/lib/src/widget_snapshot/widget_snapshotter_web.dart @@ -1,8 +1,10 @@ import 'dart:js_interop' as js; import 'dart:js_interop_unsafe'; +import 'package:flutter/foundation.dart'; + final isCanvasKit = js.globalContext['flutterCanvasKit'] != null; bool snapshotToImageSupportedInternal() { - return isCanvasKit; + return isCanvasKit || kIsWasm; }