listGSettingsSchemas function

Future<List<String>> listGSettingsSchemas()

Get the names of the installed GSettings schemas. These schemas can be accessed using a GSettings object.

Implementation

Future<List<String>> listGSettingsSchemas() async {
  var schemaNames = <String>{};
  for (var dir in _getSchemaDirs()) {
    try {
      var database = GVariantDatabase('${dir.path}/gschemas.compiled');
      schemaNames.addAll(await database.list(dir: ''));
    } on FileSystemException {
      continue;
    }
  }
  return schemaNames.toList();
}