CloudKitSyncException.fromPlatformException constructor

CloudKitSyncException.fromPlatformException(
  1. PlatformException exception
)

Converts a channel failure.

Implementation

factory CloudKitSyncException.fromPlatformException(
  PlatformException exception,
) {
  final details = exception.details;
  return CloudKitSyncException(
    code: exception.code,
    message: exception.message,
    nativeDomain: details is Map ? details['domain'] as String? : null,
    nativeCode: details is Map ? details['code'] as int? : null,
  );
}