getHttpClientResult function

Future<String> getHttpClientResult()

Implementation

Future<String> getHttpClientResult() async {
  final lastInitTime = await getLastInitTime();
  if (lastInitTime != 0) {
    final now = DateTime.now().millisecondsSinceEpoch;
    if (now - lastInitTime > 7 * 24 * 60 * 60 * 1000) {
      await setHttpClientResult('');
      await setLastInitTime(0);
      return '';
    }
  }
  final result = await _storage.read(key: _keyHttpClientResult);
  return result ?? '';
}