fetch method

Future<void> fetch(
  1. int timeoutMillisecs,
  2. _ReproCallback callback
)

Waiting to get the RemoteConfig value. And when the wait is complete, the callback function will be executed.

Implementation

Future<void> fetch(final int timeoutMillisecs, _ReproCallback callback) async {
  var args = [timeoutMillisecs];
  var cleanUpFunc = await Repro._startListening(
      methodName: 'startListening_remoteConfig_fetch',
      callback: callback,
      arguments: args,
      resultTypeName: 'FetchStatus');

  await Future.delayed(Duration(milliseconds: timeoutMillisecs + 1000));
  cleanUpFunc();
}