How can I change the color of all screens with a single buttom?

I explain: Im doing an app and I have one screen that is called "ScreenSettings", and in that screen I have the "Dark Mode". When u click the switch, it should change the background color of all screens to black. But I dont know how to make that. Recommendations?

Use tinydb to store a "setting". Whenever you open another "screen" call that setting and set the screen background colour accordingly.

How many Apps on your phone, not made by you, have their own Dark Mode Seba?

I think it is a setting best left to Android really, but if you really want to, I can't think of a better way that Tim's suggestion.