GSettings class
An object to access settings stored in a GSettings database.
Constructors
-
GSettings(String schemaName, {String? path, DBusClient? systemBus, DBusClient? sessionBus, GSettingsBackend? backend, List<
String> ? schemaDirs}) -
Creates an object to access settings from the shema with name
schemaName
. If this schema is relocatablepath
is required to be set. If the schema is not relocatable an exception will be thrown ifpath
is set.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keysChanged
→ Stream<
List< String> > -
A stream of settings key names as they change.
no setter
- path → String?
-
The path to the settings, e.g. '/org/gnome/desktop/notifications/application/org-gnome-terminal/' or null if this is a non-relocatable schema.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schemaName → String
-
The name of the schema for these settings, e.g. 'org.gnome.desktop.interface'.
final
Methods
-
close(
) → Future< void> - Terminates any open connections. If a settings object remains unclosed, the Dart process may not terminate.
-
get(
String name) → Future< DBusValue> -
Reads the value of the settings key with
name
. Attempting to read an unknown key will throw a GSettingsUnknownKeyException. If the schema is not installed will throw a GSettingsSchemaNotInstalledException. -
getDefault(
String name) → Future< DBusValue> -
Reads the default value of the settings key with
name
. If this key is not set, then this value will be returned by get. Attempting to read an unknown key will throw a GSettingsUnknownKeyException. If the schema is not installed will throw a GSettingsSchemaNotInstalledException. -
isSet(
String name) → Future< bool> -
Check if the settings key with
name
is set. -
list(
) → Future< List< String> > - Gets the names of the settings keys available. If the schema is not installed will throw a GSettingsSchemaNotInstalledException.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String name, DBusValue value) → Future< void> - Writes a single settings keys. If you need to set multiple values, use setAll.
-
setAll(
Map< String, DBusValue?> values) → Future<void> - Writes multiple settings keys in a single transaction. Writing a null value will reset it to its default value.
-
toString(
) → String -
A string representation of this object.
inherited
-
unset(
String name) → Future< void> - Removes a setting value. The key will now return the default value specified in the GSetting schema.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited