flame icon indicating copy to clipboard operation
flame copied to clipboard

Create layout component similar to IndexedStack

Open mabdelaal86 opened this issue 10 months ago • 1 comments

Problem to solve

I have a use-case where I want to show/hide some components, which can be done by add/remove them to the tree as described here. I can be nicer to have a layout component that can show one of its child components and hide the rest, somehow similar to IndexedStack layout component in Flutter.

Proposal

Create a layout component similar to IndexedStack in Flutter that support show/hide child components.

More information

I have implemented it in my project here. It can be adapted to flame engine with some generalization.

Other

  • [x] Are you interested in working on a PR for this?

mabdelaal86 avatar Feb 14 '25 11:02 mabdelaal86

Sorry for the late reply, could you expand a bit more on the use-cases this could have in a Flame game?

spydon avatar Apr 15 '25 18:04 spydon