3

I'm using flutter dev and I wanted to enable linux support to many applications and followed this tutorial but the thing is

Everytime I try to run snapcraft launches a VM and installs flutter again from the snap

this uses lot of my disk space,time and internet snapcraft --use-lxd does the same

So is there any other way to build a linux app either a deb file, appimage or anything is fine?

Thanks.

sonu ishaq
  • 101
  • 14

2 Answers2

1

Your question is conflating two different steps: building an application, and packaging an application. To build a Linux application with Flutter all you need to do is run flutter build, and you'll get a release mode Linux application.

How you package it for distribution is to you; nothing about Flutter requires snaps as the distribution option. For instance, you could just zip up the contents of the bundle folder in the build output directory, and post that somewhere for people to download.

smorgan
  • 20,228
  • 3
  • 47
  • 55
  • @BhikkhuSubhuti My answer has nothing to do with snap, so you seem to have posted your comment in the wrong location. The question asked was whether it's possible to build a Flutter app for Linux without using snapcraft. My answer is explaining that it is. I cannot "install a hello world app to the snap store using this method [I] describe" because what my answer is describing is **not using snap**. – smorgan Dec 30 '21 at 19:30
  • Maybe the title changed while you were away. "Is there a way to build snap or a linux app without using snapcraft?" Once I have a snap, installing to the snapstore is easy. I have done so with another app made with electron-builder. I guess you were speaking in the context of non release builds. Flutter run will do the trick to have a desktop run on linux. – Bhikkhu Subhuti Jan 01 '22 at 04:33
  • @BhikkhuSubhuti The title hasn't changed; "or a Linux app" is a key part of that title. See also the actual question: "So is there any other way to build a linux app either **a deb file, appimage or anything** is fine?" I was not speak ing in the context of non-release builds, no. I explicitly said how to build a release build in my answer. If you want to ask a question that is only about building a snap, you should post a new question to the site asking that instead of complaining that my answer to **a different question** doesn't tell you how to make a snap. – smorgan Jan 01 '22 at 10:50
0

Yes this can be used to make a desktop app for windows mac and linux

https://github.com/go-flutter-desktop/hover

sonu ishaq
  • 101
  • 14
  • 1
    Note that that's a completely different embedding with its own set of feature and bugs, separate plugin ecosystem, etc. It's not just different tooling for Flutter's desktop support. – smorgan Nov 02 '20 at 12:17