Flutter plugin set version

I am building a snap for my flutter application on core22. However, I am encountering some difficulties in regards to flutter versions. Locally I am running 3.7.1 and would like to use the same version when building the snap. But there only seems to be an option for the flutter channel (master, stable, etc.), and this leads to version mismatches because stable results in flutter 3.7.7.

This is my yaml

name: dakanji
version: 3.0.0
summary: You are learning Japanese? Then you need to give DaKanji a try!
description: You are learning Japanese? Then you need to give DaKanji a try!

confinement: strict
base: core22
grade: stable

slots:
  dbus-dakanji:
    interface: dbus
    bus: session
    name: org.daapplab.dakanji
    
apps:
  dakanji:
    command: DaKanji
    extensions: [gnome]
    plugs:
    - network
    slots:
      - dbus-dakanji

parts:

  copy-tf-lite:
    plugin: dump
    source: ./blobs
    stage:
    - bin/blobs/libtensorflowlite_c-linux.so
    organize:
      libtensorflowlite_c-linux.so: bin/blobs/libtensorflowlite_c-linux.so

  dakanji:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart

and I am building with

snapcraft --use-lxd

Is there a way to set the flutter version?

1 Like

We haven’t exposed this yet, @kenvandine what are your thoughts?

@sergiusens any news on this?

Use flutter from git till then. Check this as a guide:

@sergiusens @kenvandine Any news on this?

With google pushing to use Android API 34+, there’s a lot of flutter packages that dropped the support for slightly older packages, and that breaks ad hoc support for “a year old” applications.

Any how you could clarify where the guide is? The link takes to a github repo without any guide. Do you mean I should decrypt the convoluted snap/snapcraft.yaml file?