configFlutter method
void
configFlutter({
- bool neverCheckConnection = false,
- StorageInterface? storage,
- QueryConfigFlutter? config,
- List<
QueryObserver> ? observers,
Initialise CachedQuery with flutter specific configs.
refetchOnResume
is whether the onscreen query should refetch when the
app comes back into view.
Use refetchOnConnection
to re-fetch any query that has a listener when
the connection changes from no connection to connection.
neverCheckConnection
never sets up the connection listener and stream. This
cannot be overridden at the query level. If you want queries to not re-fetch
on connection by default but want to override it later use config
.
Set the global default config which all queries will use.
Implementation
void configFlutter({
bool neverCheckConnection = false,
StorageInterface? storage,
QueryConfigFlutter? config,
List<QueryObserver>? observers,
}) {
this.config(
config: config,
storage: storage,
observers: observers,
);
_refetchOnResume();
if (!neverCheckConnection) {
ConnectivityController.instance.initialize();
}
}