fetchAndActivate method

Future<void> fetchAndActivate()

Fetch and activate latest Remote Config values

Errors are swallowed; if anything fails we simply keep using defaults. Calls made while a fetch is in flight wait for that fetch instead of starting another one.

Implementation

Future<void> fetchAndActivate() {
  return _fetching ??= _fetchAndActivate().whenComplete(() {
    _fetching = null;
  });
}