diff --git a/example/lib/main.dart b/example/lib/main.dart index e383a19e..25c12d39 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -99,9 +99,11 @@ class _ExampleWidgetState extends State { Align( alignment: Alignment.bottomCenter, child: Container( - height: 30, + padding: const EdgeInsets.only(bottom: 30), + height: 100, color: Colors.white, - child: Row(children: [ + child: + Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ ControllerMenu( controller: _filamentController, onControllerDestroyed: () {}, @@ -116,8 +118,8 @@ class _ExampleWidgetState extends State { ]))), _filamentController == null ? Container() - : Align( - alignment: Alignment.topLeft, + : Padding( + padding: const EdgeInsets.only(top: 40, left: 20, right: 20), child: CameraMatrixOverlay(controller: _filamentController!), ), _filamentController == null diff --git a/example/lib/scene_menu.dart b/example/lib/scene_menu.dart index 90300b71..a36c68b2 100644 --- a/example/lib/scene_menu.dart +++ b/example/lib/scene_menu.dart @@ -23,7 +23,8 @@ class _SceneMenuState extends State { @override void didUpdateWidget(SceneMenu oldWidget) { super.didUpdateWidget(oldWidget); - if (widget.controller != oldWidget.controller || + if (widget.controller != null && + widget.controller != oldWidget.controller || widget.controller!.hasViewer != oldWidget.controller!.hasViewer) { setState(() {}); }