How to get the state of a switch or checkbox in Squareline generated code


I am not able to find any predefined getter functions for widgets like buttons, switches, or checkbox. Am I missing something?
Some widgets like slider or dropdown menu have predefined getter functions and report the state or the value. I was wondering that we probably should have for simpler widgets like a button. that if its pressed we can get the value 1 from a function in the generated code.