diff --git a/shell/platform/tizen/flutter_tizen.cc b/shell/platform/tizen/flutter_tizen.cc index cf29309bede6b..fed2bc47c06ed 100644 --- a/shell/platform/tizen/flutter_tizen.cc +++ b/shell/platform/tizen/flutter_tizen.cc @@ -181,6 +181,11 @@ void FlutterDesktopEngineNotifyAppIsDetached(FlutterDesktopEngineRef engine) { EngineFromHandle(engine)->lifecycle_channel()->AppIsDetached(); } +void FlutterDesktopViewDestroy(FlutterDesktopViewRef view_ref) { + flutter::FlutterTizenView* view = ViewFromHandle(view_ref); + delete view; +} + void FlutterDesktopViewResize(FlutterDesktopViewRef view, int32_t width, int32_t height) { diff --git a/shell/platform/tizen/public/flutter_tizen.h b/shell/platform/tizen/public/flutter_tizen.h index 051ae3bd6d765..1e7d41b934aa2 100644 --- a/shell/platform/tizen/public/flutter_tizen.h +++ b/shell/platform/tizen/public/flutter_tizen.h @@ -152,6 +152,12 @@ FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromElmParent( FlutterDesktopEngineRef engine, void* parent); +// Destroys the view. +// +// The engine owned by the view will also be shut down implicitly. +// @warning This API is a work-in-progress and may change. +FLUTTER_EXPORT void FlutterDesktopViewDestroy(FlutterDesktopViewRef view); + // Returns a handle to evas object that the FlutterView is drawn to. // // Cast the returned void* to Evas_Object*. @@ -159,7 +165,7 @@ FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromElmParent( FLUTTER_EXPORT void* FlutterDesktopViewGetEvasObject( FlutterDesktopViewRef view); -// Resize the FlutterView. +// Resizes the view. // @warning This API is a work-in-progress and may change. FLUTTER_EXPORT void FlutterDesktopViewResize(FlutterDesktopViewRef view, int32_t width,