fetchFromServer method
Future<void>
fetchFromServer()
Fetches data from the server by invoking a native method.
This method calls the native method 'SmartfaceMobile.fetchFromServer' to retrieve data from the server asynchronously.
Persisted group keys are reapplied before the native fetch so the AAR recovers its in-memory filter state after app restarts.
Returns a Future that completes when the data has been fetched.
Implementation
Future<void> fetchFromServer() async {
final groupRestoreResponse = await _restoreStoredGroupKeys();
if (groupRestoreResponse.isLeft()) {
return;
}
await invokeNativeMethod('SmartfaceMobile.fetchFromServer');
}