Gtk.Switch.prototype.get_active

function get_active():Boolean {
    // Gjs wrapper for gtk_switch_get_active()
}

Gets whether the Gtk.Switch is in its "on" or "off" state.

Since 3.0

Returns

true if the Gtk.Switch is active, and false otherwise