add bg image transform to example project

This commit is contained in:
Nick Fisher
2022-09-05 12:40:22 +10:00
parent 2916cd7b24
commit 975648fef9

View File

@@ -38,7 +38,7 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
showPerformanceOverlay: true,
// showPerformanceOverlay: true,
color: Colors.white,
home: Scaffold(
backgroundColor: Colors.white,
@@ -223,6 +223,10 @@ class _MyAppState extends State<MyApp> {
case 27:
_framerate = _framerate == 60 ? 30 : 60;
await _filamentController.setFrameRate(_framerate);
break;
case 28:
await _filamentController.setBackgroundImagePosition(-5, -5);
break;
}
},
itemBuilder: (BuildContext context) =>
@@ -317,6 +321,10 @@ class _MyAppState extends State<MyApp> {
value: 27,
child:
Text('toggle framerate')),
PopupMenuItem(
value: 28,
child:
Text('set bg image pos')),
]))),
Align(
alignment: Alignment.bottomRight,