Skip to content

chore(flutter): add snapcraft.yaml example in platform setup #4599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,8 @@
"infowindow",
"Libre's",
"Pinia",
"kotlinx"
"kotlinx",
"snapcraft"
],
"flagWords": [
"hte",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,33 @@ Add a development team in the "Signing and Capabilities" section and enable sign
No specific configuration steps are needed to begin using the Auth category on Windows; however, depending on how your Windows configuration and the method you use to run your Flutter app, you may need to change the file path length limitation.

## Linux
To run the Amplify-Flutter developer preview on Linux, you must install two libraries:

* libsecret-1-dev
* libglib2.0-dev
Amplify Flutter depends on [libsecret](https://wiki.gnome.org/Projects/Libsecret) when targeting Linux. To run and debug an app that depends on Amplify Flutter, you must install `libsecret-1-dev`.

To install on Ubuntu, run:

```terminal
sudo apt-get update
sudo apt-get install -y libsecret-1-dev
sudo apt-get install -y libglib2.0-dev
```

The command to install might vary slightly on other Linux distributions.
This will also install dependencies of `libsecret-1-dev`, such as `libglib2.0-dev`, which is also required for to run and debug apps that depend on Amplify Flutter.

> The command to install might vary on other Linux distributions.

### Packaging Your App
To include the required dependencies when packaging your app with Snapcraft, include them in your `snapcraft.yaml` file. For more info, see [Flutter's documentation on releasing to the Snap Store](https://docs.flutter.dev/deployment/linux).

```yaml
parts:
my-app:
plugin: flutter
source: .
flutter-target: lib/main.dart
build-packages:
- libsecret-1-dev
stage-packages:
- libsecret-1-0
```

</Block>

Expand Down