Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on: push

env:
# Keep this in sync with the version used by FlutterFlow.
DART_VERSION: 3.6.1
FLUTTER_VERSION: 3.27.3
DART_VERSION: 3.8.1
FLUTTER_VERSION: 3.32.4

jobs:
check:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.29

- Add support for download_url.

## 0.0.28

- Update path version.
Expand Down
11 changes: 10 additions & 1 deletion lib/src/flutterflow_api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,16 @@ Future<String?> exportCode({
exportAsDebug: exportAsDebug,
);
// Download actual code
final projectZipBytes = base64Decode(result['project_zip']);
final List<int> projectZipBytes;
if (result['download_url'] != null) {
final response = await client.get(Uri.parse(result['download_url']));
if (response.statusCode != 200) {
throw 'Failed to download project zip from URL: ${response.statusCode}';
}
projectZipBytes = response.bodyBytes;
} else {
projectZipBytes = base64Decode(result['project_zip']);
}
final projectFolder = ZipDecoder().decodeBytes(projectZipBytes);

extractArchiveTo(projectFolder, destinationPath, unzipToParentFolder);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutterflow_cli
description: >-
Command-line client for FlutterFlow. Export code from FlutterFlow projects.
version: 0.0.28
version: 0.0.29
homepage: https://github.com/FlutterFlow/flutterflow-cli
issue_tracker: https://github.com/flutterflow/flutterflow-issues

Expand Down
4 changes: 4 additions & 0 deletions test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Future<bool> buildProject(String project) async {
var result = await Process.run('flutter', ['build', 'web'],
workingDirectory: p.normalize(project), runInShell: true);

if (result.exitCode != 0) {
stderr.writeln(result.stderr);
}

return result.exitCode == 0;
}

Expand Down