-1

I need a listView for my Game. Is there a simple way to create one? There are no tutorials for such a feature and I couldn't find anything in the documentation.

1 Answers1

1

Flame doesn't provide their own widgets for these things, we rely on Flutters excellent widget system.

So you create the widget directly in Flutter and then you either put your GameWidget in a stack (or similar) and use Flutter's own Navigation to move between the widgets, or you use Flame's overlay system.

For using the overlays you add the overlays that you want to have accessible when you create the GameWidget and then you call game.overlays.add to render a specific widget, and game.overlays.remove to stop rendering it.

spydon
  • 9,372
  • 6
  • 33
  • 63
  • Are there any tutorials for this? I couldn't find anything. – Seyyid Tiryaki Aug 27 '21 at 14:44
  • Tutorials for how to create a ScrollView, or to use the Flame overlays API? For the latter there is information about it in the Flame docs (it is a pretty small api). – spydon Aug 29 '21 at 01:00
  • @spydon could you help me with this question? https://stackoverflow.com/questions/69328474/can-i-use-a-widget-as-a-actual-component-in-flutter-flame – dante Sep 25 '21 at 17:25