When I tried to repeat some lecture of flutter flame, most of youtube instructors teach me this way to shake screen. But IDE complaint using camera property directly was deprecated.
So, What is best way to shake camera (or viewport or world) now days?
try
- camera.shake(); // deprecated
- gameRef.camera.shake(); // deprecated
- gameRef.world.shake(); // method not exists
- gameRef.cameraComponent.shake(); // method not exists
- gameRef.cameraComponent.viewport.shake(); // method not exists
- gameRef.cameraComponent.camera.shake(); // method not exists
expect
- no deprecated