switch to new gecko pref api

This commit is contained in:
Fabian Freund
2025-10-18 10:03:50 +02:00
parent c8a4657c98
commit 641d3c7d64
16 changed files with 355 additions and 263 deletions
@@ -1075,14 +1075,30 @@ abstract class GeckoIconsApi {
IconResult loadIcon(IconRequest request);
}
class GeckoPrefValue {
final Object? value;
final Object? defaultValue;
final Object? userValue;
final bool hasUserChangedValue;
GeckoPrefValue(
this.value,
this.defaultValue,
this.userValue,
this.hasUserChangedValue,
);
}
@HostApi()
abstract class GeckoPrefApi {
@async
Map<String, Object> getPrefs(List<String>? preferenceFilter);
List<String> getPrefList();
@async
Map<String, Object> applyPrefs(String prefBuffer);
Map<String, GeckoPrefValue> getPrefs(List<String> preferenceFilter);
@async
void resetPrefs(List<String>? preferenceNames);
Map<String, GeckoPrefValue> applyPrefs(Map<String, Object> prefs);
@async
void resetPrefs(List<String> preferenceNames);
}
@HostApi()