@@ -36,6 +36,7 @@ class FlutterFlowApi {
3636 required bool includeAssets,
3737 String endpoint = kDefaultEndpoint,
3838 String ? branchName,
39+ String ? commitHash,
3940 bool unzipToParentFolder = false ,
4041 bool fix = false ,
4142 bool exportAsModule = false ,
@@ -49,6 +50,7 @@ class FlutterFlowApi {
4950 destinationPath: destinationPath,
5051 includeAssets: includeAssets,
5152 branchName: branchName,
53+ commitHash: commitHash,
5254 unzipToParentFolder: unzipToParentFolder,
5355 fix: fix,
5456 exportAsModule: exportAsModule,
@@ -68,6 +70,7 @@ Future<String?> exportCode({
6870 required bool exportAsModule,
6971 bool format = true ,
7072 String ? branchName,
73+ String ? commitHash,
7174 bool exportAsDebug = false ,
7275}) async {
7376 if (exportAsDebug && exportAsModule) {
@@ -83,6 +86,7 @@ Future<String?> exportCode({
8386 endpoint: endpointUrl,
8487 projectId: projectId,
8588 branchName: branchName,
89+ commitHash: commitHash,
8690 exportAsModule: exportAsModule,
8791 includeAssets: includeAssets,
8892 format: format,
@@ -156,16 +160,16 @@ Future<dynamic> _callExport({
156160 required Uri endpoint,
157161 required String projectId,
158162 String ? branchName,
163+ String ? commitHash,
159164 required bool exportAsModule,
160165 required bool includeAssets,
161166 required bool format,
162167 required bool exportAsDebug,
163168}) async {
164169 final body = jsonEncode ({
165- 'project' : {
166- 'path' : 'projects/$projectId ' ,
167- },
170+ 'project' : {'path' : 'projects/$projectId ' },
168171 if (branchName != null ) 'branch_name' : branchName,
172+ if (commitHash != null ) 'commit' : {'path' : 'commits/$commitHash ' },
169173 'export_as_module' : exportAsModule,
170174 'include_assets_map' : includeAssets,
171175 'format' : format,
0 commit comments