of static method
Implementation
static BasePrefService of(BuildContext context, {bool listen = true}) {
if (listen) {
return context.dependOnInheritedWidgetOfExactType<PrefService>()!.service;
}
return context.findAncestorWidgetOfExactType<PrefService>()!.service;
}