chore: Remove 1.8.0 deprecations (#2538)

Removes all the deprecated methods before 1.8.0 release.
This commit is contained in:
Lukas Klingsbo
2023-05-22 19:01:55 +02:00
committed by GitHub
parent 6e1d5466aa
commit 2d45d2be39
139 changed files with 1224 additions and 1084 deletions

View File

@ -12,13 +12,22 @@ class RemoveEffectExample extends FlameGame {
disappear after a 0.5 second delay.
''';
final world = World();
late final CameraComponent cameraComponent;
@override
void onMount() {
void onLoad() {
super.onMount();
camera.viewport = FixedResolutionViewport(Vector2(400, 600));
cameraComponent = CameraComponent.withFixedResolution(
world: world,
width: 400,
height: 600,
);
cameraComponent.viewfinder.anchor = Anchor.topLeft;
addAll([cameraComponent, world]);
final rng = Random();
for (var i = 0; i < 20; i++) {
add(_RandomCircle.random(rng));
world.add(_RandomCircle.random(rng));
}
}
}