Skip to content

Commit

Permalink
chore(flutter): add snapcraft.yaml example in platform setup (#4599)
Browse files Browse the repository at this point in the history
* chore: add snapcraft.yaml example

* chore: update snapcraft example

* Update src/fragments/lib/project-setup/flutter/platform-setup/platform-setup.mdx

Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com>

* chore: remove  in Amplify-Flutter

* chore: include lin kto flutter docs

* chore: add links, update libglib2

Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com>
  • Loading branch information
2 people authored and rachelnabors committed Apr 4, 2023
1 parent f3cf1d2 commit 00ba0e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
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,22 +110,35 @@ 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:

/* cSpell:disable */
```terminal
sudo apt-get update
sudo apt-get install -y libsecret-1-dev
sudo apt-get install -y libglib2.0-dev
```
/* cSpell:enable */

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

0 comments on commit 00ba0e1

Please sign in to comment.