User preferences set up

HI,

I am wanting to set up user preferences with a toggle switch which will then filter the information I have on a database that I have with firebase

Please can someone tell me how I would go about setting this up

thank you