Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The getter 'widget' isn't defined for the type 'BoxGame'. #4

Open
asystat opened this issue Jan 20, 2021 · 2 comments
Open

The getter 'widget' isn't defined for the type 'BoxGame'. #4

asystat opened this issue Jan 20, 2021 · 2 comments

Comments

@asystat
Copy link

asystat commented Jan 20, 2021

When I write runApp(game.widget), my IDE shows this error... is there something outdated regarding this?

@mike2096
Copy link

I'm getting the same error. Any update on this?

@KidProf
Copy link

KidProf commented Mar 9, 2022

I encountered this error as well, the fix should be

BoxGame game = BoxGame();
  runApp(
    GameWidget(
      game: game,
    ),
  );

Src: https://medium.com/flutter-community/flutter-flame-step-1-create-your-game-b3b6ee387d77
https://docs.flame-engine.org/1.0.0/game.html?highlight=widgets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants