From cf372f4dc2abf177f25e7e37b4a5597d5b05cfb2 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Wed, 2 Apr 2025 22:28:47 +0800 Subject: [PATCH] call method channel destroyContext on Windows --- .../lib/src/thermion_flutter_method_channel_platform.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart index 536a7d52..ec6fec46 100644 --- a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart +++ b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart @@ -98,7 +98,9 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform { if (FilamentApp.instance == null) { await FFIFilamentApp.create(config: config); FilamentApp.instance!.onDestroy(() async { - await channel.invokeMethod("destroyContext"); + if(Platform.isWindows) { + await channel.invokeMethod("destroyContext"); + } _swapChain = null; }); }