signOutWithMode method

Future<void> signOutWithMode(
  1. ClientSignOutMode mode,
  2. bool fromAllDevices, {
  3. required void onSuccess(),
  4. required void onError(
    1. SyneriseError error
    ),
})

The function signOutWithMode signs out the client with the specified mode and from all devices if specified.

Args: mode (ClientSignOutMode): The mode parameter is of type ClientSignOutMode, which is an enum that represents the sign out mode. fromAllDevices (bool): A boolean value indicating whether the sign out should be applied to all devices or just the current device.

Implementation

Future<void> signOutWithMode(ClientSignOutMode mode, bool fromAllDevices,
    {required void Function() onSuccess,
    required void Function(SyneriseError error) onError}) async {
  SyneriseResult<void> result =
      await _methods.signOutWithMode(mode, fromAllDevices);

  result.onSuccess((result) {
    onSuccess();
  }).onError((error) {
    onError(error);
  });
}