Flutter without UI

1,122 views
Skip to first unread message

Mike Mitterer

unread,
May 14, 2016, 12:05:35 PM5/14/16
to flutt...@googlegroups.com
Hi, is there a way to use Flutter without it's UI part?

What I want is to use Dart/Flutter on Android but without Flutters "All inclusive"-Idea.
Android/Android Studio is really mature these days and Gradle helps to complete the positive picture.
I think the better approach would be to integrate Dart into this workflow instead of reinventing the wheel.

Writing a native UI is not really that big problem. It's the business logic behind.
It would be cool to have something like a Dart-VM in a JAR. (Without the HTML-Part)
Communication between the native part and Dart could be done via protobuf or JSON-based Message bus.
Would make it easy to implements additional functionality on both sides...

This UI-less approach has another advantage - there is no need (or very limited need) to switch between the UI-Thread and a background task.
Dart VM could run as a background service...

OK - there is iOS but I think its easier to convince the Android Devs of Dart so this should have priority.

Thanks
Mike

PS: I know I could compile Dart to JS and use the JS-Version but the transpile process is a bit annoying and
Gradle (the Dexer???) doesn't always recognize the changes so I have to "Clean and Run" in Android Studio.
Debugging the JS code is also not possible.

-- 
Michael Mitterer, 
IT-Consulting and Development Limited,
Niederlassung Österreich
Dorfstraße 112
A-6363 Westendorf, Tirol
Firmenbuchnummer: FN382753y
UID: ATU67431503

Tel: +43 5334 8899
Mobil: +43 676 6319899
Skype: mike.mitterer
off...@mikemitterer.at
www.mikemitterer.at    

Für topaktuelle Infos folgen Sie mir bitte auf Google+:
  http://googleplus.mikemitterer.at/

oder auf Twitter:
  http://twitter.mikemitterer.at/   

natürlich auch auf FaceBook
  http://facebook.mikemitterer.at/

und auf YouTube
  http://youtube.mikemitterer.at/

-----------------------------------------------------------------------
Auskünfte und Angebote per eMail
sind freibleibend und unverbindlich.

Die geltenden AGB finden Sie unter folgendem Link:
http://www.mikemitterer.at/kontakt/impressum/agb/

-----------------------------------------------------------------------
Diese Email wurde digital signiert, somit wird sichergestellt, dass
diese Email auch von dem Absender stammt, den Sie erwarten.
Bitte prüfen Sie die Gültigkeit dieser Unterschrift. Vertrauen Sie
keinem Inhalt den Sie von dieser Emailadresse (off...@mikemitterer.at)
erhalten ohne gültige Unterschrift - Zu Ihrer eigenen Sicherheit.

[x] Bitte denken Sie an die Umwelt bevor Sie diese eMail drucken!
    
         

Adam Barth

unread,
May 14, 2016, 3:46:24 PM5/14/16
to Mike Mitterer, flutt...@googlegroups.com
On Sat, May 14, 2016 at 9:05 AM Mike Mitterer <off...@mikemitterer.at> wrote:
Hi, is there a way to use Flutter without it's UI part?

Yes, although it might be slightly awkward.  The easiest way would be to just create a FlutterView that's one pixel wide and one pixel tall.  If you're willing to hack up and build your own engine, you can probably get it working without any graphics at all.

What I want is to use Dart/Flutter on Android but without Flutters "All inclusive"-Idea.
Android/Android Studio is really mature these days and Gradle helps to complete the positive picture.
I think the better approach would be to integrate Dart into this workflow instead of reinventing the wheel.

Yes, we agree and are working on making Flutter build that way on Android normally.

Writing a native UI is not really that big problem. It's the business logic behind.
It would be cool to have something like a Dart-VM in a JAR. (Without the HTML-Part)
Communication between the native part and Dart could be done via protobuf or JSON-based Message bus.
Would make it easy to implements additional functionality on both sides...

Yeah, we have a JSON-based message bus for FlutterView.

This UI-less approach has another advantage - there is no need (or very limited need) to switch between the UI-Thread and a background task.
Dart VM could run as a background service...

We've set up the Dart VM to run on a background thread in Flutter.  In principle, you could also run it on the main Java thread, but that didn't perform as well in our experiments.
Reply all
Reply to author
Forward
0 new messages