diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets index 8c757c2a47ed5ef253920e1fb88f15e0f332a5c9..14a84d6948165997b26818de97083bbbd1e06048 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/PlatformPlugin.ets @@ -82,6 +82,10 @@ export default class PlatformPlugin { }) } } + + public destroy() { + this.callback.platformChannel?.setPlatformMessageHandler(null); + } } export interface PlatformPluginDelegate {