From 9978d9d75c8f06eaa594959385ee2faa0c5b6470 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Fri, 28 Mar 2025 11:47:31 +0800 Subject: [PATCH] use View as key for ThermionWidget and update docstrings --- .../lib/src/widgets/src/thermion_widget.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/thermion_flutter/thermion_flutter/lib/src/widgets/src/thermion_widget.dart b/thermion_flutter/thermion_flutter/lib/src/widgets/src/thermion_widget.dart index 234484c3..23894235 100644 --- a/thermion_flutter/thermion_flutter/lib/src/widgets/src/thermion_widget.dart +++ b/thermion_flutter/thermion_flutter/lib/src/widgets/src/thermion_widget.dart @@ -19,8 +19,9 @@ Future kDefaultResizeCallback(Size size, View view, double pixelRatio) async { } class ThermionWidget extends StatefulWidget { + /// - /// The viewer. + /// The viewer whose content will be rendered into this widget. /// final ThermionViewer viewer; @@ -40,6 +41,9 @@ class ThermionWidget extends StatefulWidget { /// final Future Function(Size size, View view, double pixelRatio)? onResize; + /// + /// If true, add an overlay showing the FPS on top of the rendered content. + /// final bool showFpsCounter; /// @@ -72,7 +76,7 @@ class _ThermionWidgetState extends State { } return ThermionTextureWidget( - key: ObjectKey(widget.viewer), + key: ObjectKey(widget.viewer.view), initial: widget.initial, viewer: widget.viewer, showFpsCounter: widget.showFpsCounter,