code: def do_toggle_fullscreen(self, action):
          
          is_fullscreen = action.get_active()
          if is_fullscreen:
              self.fullscreen()
          else:
              self.unfullscreen()
docs: Widget Action to Toggle fullscreen from the GUI