@@ -36,6 +36,7 @@ class FlutterFlowApi {
36
36
required bool includeAssets,
37
37
String endpoint = kDefaultEndpoint,
38
38
String ? branchName,
39
+ String ? commitHash,
39
40
bool unzipToParentFolder = false ,
40
41
bool fix = false ,
41
42
bool exportAsModule = false ,
@@ -49,6 +50,7 @@ class FlutterFlowApi {
49
50
destinationPath: destinationPath,
50
51
includeAssets: includeAssets,
51
52
branchName: branchName,
53
+ commitHash: commitHash,
52
54
unzipToParentFolder: unzipToParentFolder,
53
55
fix: fix,
54
56
exportAsModule: exportAsModule,
@@ -68,6 +70,7 @@ Future<String?> exportCode({
68
70
required bool exportAsModule,
69
71
bool format = true ,
70
72
String ? branchName,
73
+ String ? commitHash,
71
74
bool exportAsDebug = false ,
72
75
}) async {
73
76
if (exportAsDebug && exportAsModule) {
@@ -83,6 +86,7 @@ Future<String?> exportCode({
83
86
endpoint: endpointUrl,
84
87
projectId: projectId,
85
88
branchName: branchName,
89
+ commitHash: commitHash,
86
90
exportAsModule: exportAsModule,
87
91
includeAssets: includeAssets,
88
92
format: format,
@@ -156,16 +160,16 @@ Future<dynamic> _callExport({
156
160
required Uri endpoint,
157
161
required String projectId,
158
162
String ? branchName,
163
+ String ? commitHash,
159
164
required bool exportAsModule,
160
165
required bool includeAssets,
161
166
required bool format,
162
167
required bool exportAsDebug,
163
168
}) async {
164
169
final body = jsonEncode ({
165
- 'project' : {
166
- 'path' : 'projects/$projectId ' ,
167
- },
170
+ 'project' : {'path' : 'projects/$projectId ' },
168
171
if (branchName != null ) 'branch_name' : branchName,
172
+ if (commitHash != null ) 'commit' : {'path' : 'commits/$commitHash ' },
169
173
'export_as_module' : exportAsModule,
170
174
'include_assets_map' : includeAssets,
171
175
'format' : format,
0 commit comments