@@ -22,6 +22,8 @@ class FlutterFlowApi {
22
22
/// * [unzipToParentFolder] flag indicates whether to unzip the exported code
23
23
/// to the parent folder.
24
24
/// * [fix] flag indicates whether to fix any issues in the exported code.
25
+ /// * [exportAsModule] flag indicates whether to export the code as a module.
26
+ /// * [format] flag indicates whether to format the exported code.
25
27
///
26
28
/// Returns a [Future] that completes with the path to the exported code, or
27
29
/// throws an error if the export fails.
@@ -35,6 +37,7 @@ class FlutterFlowApi {
35
37
bool unzipToParentFolder = false ,
36
38
bool fix = false ,
37
39
bool exportAsModule = false ,
40
+ bool format = true ,
38
41
}) =>
39
42
exportCode (
40
43
token: token,
@@ -46,6 +49,7 @@ class FlutterFlowApi {
46
49
unzipToParentFolder: unzipToParentFolder,
47
50
fix: fix,
48
51
exportAsModule: exportAsModule,
52
+ format: format,
49
53
);
50
54
}
51
55
@@ -58,6 +62,7 @@ Future<String?> exportCode({
58
62
required bool unzipToParentFolder,
59
63
required bool fix,
60
64
required bool exportAsModule,
65
+ bool format = true ,
61
66
String ? branchName,
62
67
}) async {
63
68
final endpointUrl = Uri .parse (endpoint);
@@ -72,6 +77,7 @@ Future<String?> exportCode({
72
77
branchName: branchName,
73
78
exportAsModule: exportAsModule,
74
79
includeAssets: includeAssets,
80
+ format: format,
75
81
);
76
82
// Download actual code
77
83
final projectZipBytes = base64Decode (result['project_zip' ]);
@@ -143,6 +149,7 @@ Future<dynamic> _callExport({
143
149
String ? branchName,
144
150
required bool exportAsModule,
145
151
required bool includeAssets,
152
+ required bool format,
146
153
}) async {
147
154
final body = jsonEncode ({
148
155
'project' : {
@@ -151,6 +158,7 @@ Future<dynamic> _callExport({
151
158
if (branchName != null ) 'branch_name' : branchName,
152
159
'export_as_module' : exportAsModule,
153
160
'include_assets_map' : includeAssets,
161
+ 'format' : format,
154
162
});
155
163
final response = await client.post (
156
164
Uri .https (endpoint.host, '${endpoint .path }/exportCode' ),
0 commit comments