
Flutter on desktop, a real competitor to Electron - norbert515
https://medium.com/flutter-community/flutter-on-desktop-a-real-competitor-to-electron-4f049ea6b061
======
thrownaway954
The road block for adoption will be Dart. Why they didn't just choose
Typescript or go with native javascript is beyond me. No one uses Dart. It was
probably the poorest design decision they could make.

~~~
dragonfly02
Dart 2 is a very solid language. It's primarily an OO language but does have
some functional elements in it. It's very similar to Java and C# and most dart
developers think it's a better version of Java and C#. It has more features
like stream, asynchronous and mixins built into the language. It's in fact a
full stack language as you can write server side code in dart as well. I think
Google's long-term goal is to make dart/flutter compatible with mobile (iOS
and Android), web, desktop (macOS, Linux, Windows). It will be truly write
once and run everywhere.

~~~
devxpy
Can't agree more. Much better choice than js/ts

------
dragonfly02
I believe flutter will be the only thing that will be truly "write once, run
everywhere" as it will be compatible with with mobile (iOS and Android), web,
desktop (macOS, Linux, Windows).

------
wb14123
I'm wondering why people don't write cross platform applications with Qt.

~~~
typon
Does Qt have the same features as Flutter? I'm thinking about an excellent
IDE, hot reloading, ability to target mobile and desktop etc.

~~~
shakna
* Excellent IDE

Yes. It's well-written C++. Any IDE can handle it, but the also have their own
which gives you a few more things, like drag'n'drop design.

* Hot reloading

Depends.

Old-school Qt? No. It's more powerful, but can't hot reload.

New-school QML? Yes. But you are limited to QtQuick, which is only on-par with
Electron's features.

* Ability to target mobile and desktop, etc.

Yes. Supported targets include: Windows, UWP, Linux, macOS, Andorid, iOS,
watchOS, tvOS, QNX, and other embedded platforms.

------
wpdev_63
Flutter isn't a competitor to electron as you can't target web browsers with
it.

I tried Flutter over a year ago and found the instant reloading of code nice
and has most of modern features but went back to native as the library support
is still non-existent.

The real competitor to flutter is kotlin cross-platform from jetbrains. Most
android developers are already familiar with kotlin, unlike dart, and also has
great tooling.

I look forward to seeing which one wins mind share as they are well designed
options.

~~~
johnisgood
Incorrect. You can target web browsers with it.

> Dart’s flexibility in compilation and execution doesn’t stop there. For
> example, _Dart can be compiled into JavaScript so it can be executed by
> browsers. This allows code reuse between mobile apps and web apps._
> Developers have reported as high as 70% code reuse between their mobile and
> web apps. Dart can also be used on a server either by being compiled to
> native code, or by compiling to JavaScript and using it with node.js.

Source: [https://hackernoon.com/why-flutter-uses-dart-
dd635a054ebf](https://hackernoon.com/why-flutter-uses-dart-dd635a054ebf)

~~~
dragonwriter
Dart can target web but Flutter doesn't yet have support for browsers.

------
childintime
I'll have to check it out, because this seems to be what I've been waiting
for: access to Android and Windows eco-systems, reasonably small .exe sizes
and excellent performance.

The other things are just icing on the cake: best in class framework, hot-
reloading, runs on IOS (until Apple gets irritated), development on Linux, and
a more than decent language to write apps in.

------
garyclarke27
Flutter for ios android web win mac sounds like the holy grail of cross
platform development! Tempted to invest v significantly, one major concern
though is the focus on Angular for web. IMHO Polymer would have been a much
better choice, since most browsers now support web components custom elements
natively, so Angular focus is a major turn-off for me.

------
matejmecka
The biggest question is will companies start migrating to Flutter from
Electron.

Plus who will decide to use this in a market dominated by Electron?

~~~
seandougall
[raises hand] If it can avoid a >100 MB hello world, I’m on board. That makes
it worth learning a language I would never have heard otherwise.

~~~
shakna
If that's a serious suggestion then...

* Dart/Flutter {iOS, Android} [0]

* (Scheme|Lua|C)/IUP {Linux, Windows, macOS} [1]

* (QML with JS)/QtQuick {Windows, Linux, macOS, UWP, Android, iOS...} [2]

* (C++|Rust|Go|Python...)/Qt {Windows, Linux, macOS, UWP, Android, iOS...} [3]

* (TCL|Ada|Haskell|Python...)/Tk {Windows, Linux, macOS} [4]

* (TCL)/Hecl {Windows, Linux, macOS, Android} [5]

* (Scheme|C|JS|Haskell...)/GTK+ {Windows, Linux, macOS, Android^} [6]

* (C++|Python|Ruby|...)/WxWidgets {Windows, Linux, macOS, {Anywhere GTK or Qt run...}} [7]

(^ May not be stable or officially supported)

... All the platforms listed are cross-platform.

Some look native, some don't, but no Electron app does anyway.

Most package to single binary, some need proper packaging.

All are very simple to get started.

Tk has the least features, but TCL is just a shell language, so getting
started is ridiculously easy. However, Tk can do things like inject its frames
into any running process's window.

QT and GTK+ are the most powerful, which can confuse newcomers. But they're
still simple to do simple things with.

I've used all but Flutter in a professional environment (but evaluated it),
sometimes as maintainer, sometimes building something new. They're all solid.
Different drawbacks with all of them, but there's always tradeoffs in
programming.

For a beginner, I'd probably recommend QtQuick or WxWidgets.

[0] [https://flutter.io/](https://flutter.io/)

[1] [http://webserver2.tecgraf.puc-rio.br/iup/](http://webserver2.tecgraf.puc-
rio.br/iup/)

[2] [http://doc.qt.io/qt-5/qtquick-index.html](http://doc.qt.io/qt-5/qtquick-
index.html)

[3]
[https://wiki.qt.io/Language_Bindings](https://wiki.qt.io/Language_Bindings)

[4]
[https://www.tcl.tk/man/tcl8.5/TkCmd/tk.htm](https://www.tcl.tk/man/tcl8.5/TkCmd/tk.htm)

[5] [https://www.hecl.org/](https://www.hecl.org/)

[6] [https://www.gtk.org/](https://www.gtk.org/)

[7] [https://www.wxwidgets.org/](https://www.wxwidgets.org/)

~~~
coldtea
Most of them have been tried for ages and never got anywhere, and still look
like crap (e.g. tcl).

Others have crappy support for different platforms (e.g. GTK and Windows/OSX)
and that's for decades, not just because they are new.

None of them has the promise of Flutter: modern JS-like language, dead easy
development, simple IDE support, cross platform, nice UI toolkit, hot
reloading, and so on.

~~~
shakna
> modern JS-like language, dead easy development, simple IDE support, cross
> platform, nice UI toolkit, hot reloading, and so on.

That would be QtQuick.

