syncDev method

Future<Map<String, dynamic>> syncDev({
  1. required int projectId,
  2. String? figmaFileHash,
})

Synchronizes a project with the development environment.

projectId is the ID of the project to synchronize. figmaFileHash is the hash of the current Figma file state. If provided, the server will only send patches if there are changes.

Returns a map containing patches and the updated file hash.

Implementation

Future<Map<String, dynamic>> syncDev({
  required int projectId,
  String? figmaFileHash,
}) async {
  return get(
    'projects/$projectId/sync/dev',
    queryParams:
        figmaFileHash != null ? {'figmaFileHash': figmaFileHash} : {},
  );
}