update example project

This commit is contained in:
Nick Fisher
2023-12-15 23:39:56 +08:00
parent f5244975df
commit de3cc00059
9 changed files with 222 additions and 147 deletions

View File

@@ -82,21 +82,17 @@ class _CameraSubmenuState extends State<CameraSubmenu> {
child: const Text('Move to 1, 1, -1'),
),
MenuItemButton(
onPressed: ExampleWidgetState.last == null
? null
: () async {
await widget.controller
.setCamera(ExampleWidgetState.last!, null);
},
onPressed: () async {
await widget.controller
.setCamera(ExampleWidgetState.assets.last!, null);
},
child: const Text('Set to first camera in last added asset'),
),
MenuItemButton(
onPressed: ExampleWidgetState.last == null
? null
: () async {
await widget.controller
.moveCameraToAsset(ExampleWidgetState.last!);
},
onPressed: () async {
await widget.controller
.moveCameraToAsset(ExampleWidgetState.assets.last!);
},
child: const Text("Move to last added asset"),
),
MenuItemButton(