There are currently four Flutter extensions. They each track a different Flutter build release channel to help with the creation of snaps that use the Flutter UI toolkit:
- flutter-stable tracks Flutter’s stable channel
- flutter-beta tracks Flutter’s beta channel
- flutter-master tracks Flutter’s master channel
- flutter-dev tracks Flutter’s dev channel
ⓘ The Flutter extension does not currently support core22. Snaps using
core22
should instead use the flutter plugin with the gnome extension.
Each Flutter extension uses the gnome-3-28 extension to provide many of the components needed to build Flutter desktop applications.
Use of the flutter plugin is optional. The plugin drives the build process while the extension handles its dependencies.
- Using the extensions: adding the necessary keywords to your snapcraft.yaml
- Interface connections: which interfaces are accessible from the extension
Snapcraft extensions enable snap developers to easily incorporate a set of common requirements into a snap. See Snapcraft extensions for further details.
Using the extensions
Each Flutter extension works with the core18
base snap (see Base snaps for details). To use either extension, add extensions: [flutter-master]
or extensions: [flutter-dev]
to the application definition in your snapcraft.yaml file. For instance:
apps:
tali:
extensions: [flutter-master]
command: usr/bin/tali
[...]
See Flutter applications for a comprehensive overview of using extensions with Flutter applications.
Interface connections
The following plugs are provided by either extension and implicitly included in your snapcraft.yaml:
plugs:
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes
platform_snap:
interface: content
target: $SNAP/gnome-platform
Your app may still need additional plugs, but you can expect the following plugs to be automatically available to your apps as well:
plugs: [ desktop, desktop-legacy, gsettings, opengl, wayland, x11 ]
See Adding interfaces for more details.