Help me to disable/ lock a button

i'm making an app which have 10 level (with a button). I want the buttons cannot be pressed if the previous button have not done yet. Can you help me how to do it? thank you very much!

Show what you have tried so far (your blocks) and explain in more detail.

See also here: How to ask a question (open new topic)

hello! thanks for replying my topic, sorry this is my first time to open a topic in here

I was thinking to make the buttons cannot be pressed if the previous category have not done yet.

but when i try it in AI Companion, it doesn't work. When i finished playing the number category and went back to the main screen, the prepositions category cannot be clicked.

Some basic logic:

I used a notifier for simplicity, but if you make a list of your screens (to include numbers that match your selected number) then you can use the selected index to set the screen to go to.

is it possible to use multiple buttons that represent each level instead of using listpicker? Also can i use the tinyDB to save user's progress (so, when user close the app, and open it again, it can save which category they've played and category they've not played)