Skip to content

Commit

Permalink
fix: FutureOr return type of ComponentViewportMargin.onLoad (#3059)
Browse files Browse the repository at this point in the history
Closes #3058
  • Loading branch information
spydon committed Mar 1, 2024
1 parent 2ed71a3 commit 72678c6
Showing 1 changed file with 3 additions and 1 deletion.
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flame/camera.dart';
import 'package:flame/components.dart';
import 'package:flame/effects.dart';
Expand Down Expand Up @@ -29,7 +31,7 @@ mixin ComponentViewportMargin<T extends FlameGame>

@override
@mustCallSuper
Future<void> onLoad() async {
FutureOr<void> onLoad() async {
super.onLoad();
assert(parent is ReadOnlySizeProvider, 'The parent must provide a size.');
// If margin is not null we will update the position `onGameResize` instead
Expand Down

0 comments on commit 72678c6

Please sign in to comment.