syncContacts static method
- required bool isFirstTime,
- required dynamic flyCallBack(
- FlyResponse response
Asynchronously synchronizes contacts with the Mirrorfly platform.
This method triggers the synchronization process with the Mirrorfly platform
to update the local contact list. It takes a boolean parameter, isFirstTime
,
indicating whether this is the first synchronization attempt. The return value
is a Future<bool?>, representing the success of the synchronization operation.
If the synchronization is successful, it returns true; otherwise, it returns false
or null in case of any errors or exceptions.
Parameters:
- isFirstTime: A required boolean parameter indicating whether this is the first synchronization attempt.
Returns:
The flyCallBack
parameter is a function that will be called upon completion of the operation.
It receives a FlyResponse object as a parameter, which contains information about the success or failure of the operation.
Example usage:
Mirrorfly.syncContacts(isFirstTime: true,flyCallBack: (response){
});
Implementation
static Future<void> syncContacts(
{required bool isFirstTime,
required Function(FlyResponse response) flyCallBack}) async {
return FlyChatFlutterPlatform.instance
.syncContacts(isFirstTime, flyCallBack);
}