Tiny Database with 3 buttons

Hello, im new so my question is, i have put these blocks in my screen, but i want to use one button for the light mode in my screen, one button called dark mode to put the black mode in the screen and the daltonism button which makes the screen with colours of daltonism. My question is, how to use the tinyDB for when i touch the button light mode, it puts the light mode, when i touch the daltonism it puts the daltonism mode and when i touch the dark button, it puts the dark mode. These are my blocks.

init2 apk

THANK YOU.

Maybe this guide will help you

1 Like

I have implemented the dark mode, the problem is that i don’t know how to use the tinyDB with the three buttons.

When app starts check tinydb for mode, if empty ask user to choose between those three dark, light and daltonism and save it to tinydb.

1 Like

Can you show me how to do it? Im new so i don’t know so much :frowning:

Below you will find a modified aia from @Amit_Narwal 's original aia posted in dark-light-mode-tutorial-for-beginners

See how it works with 3 buttons

darkMode_btig2v_modified.aia (8.7 KB)

1 Like

OMG THANK YOU , you are the best person in the world hahaha, thank you very much !

1 Like