Live data from Hacker News

Graphical User Interface Using Flutter in Embedded Systems [pdf]

static.sched.com

171–180 of 202 posts

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#171

I also, independently, started writing an app in Flutter for fun (no experience in mobile/desktop GUI work, several years since I've worked in front-end web). I can give a list of pros/cons that probably overlaps what you've heard: Pros: - The toolkit feels fairly mature and not too hard to parse. I think there's a lot of "this class works with defaults and breaks otherwise" feeling, though the core components are ro…

Some of the drawbacks I have noticed with flutter: 1. One of the biggest problems with flutter is the IDE integration for the design aspects. In my opinion, the development experience is much worse than Xamarin, .NET/Mono, Delphi, Lazarus etc. 2. The documentation is not very good and can be quite out of date. 3. The components are mostly all UI/layout related. There aren't good components for DB integration etc. 4.…

Re #3 check out https://pub.dev

e.g. https://pub.dev/packages?q=sql

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#172
post #104

Earlier quoted context omitted.

How about stuff like being able to select text in the UI? I tried a couple apps in https://gallery.flutter.dev/#/ and none of the text was selectable like in web and desktop interfaces

Flutter's Text widget (which is generally the default for most devs when displaying text) doesn't allow for text selection. There's a SelectableText widget that does, though: https://api.flutter.dev/flutter/material/SelectableText-clas...

While Flutter makes text selection an explicit choice for developers, Text vs SelectableText, for some reason Text ended up being most used. This is likely because SelectableText came after Text and because of Flutter's mobile background. Most mobile apps use non-selectable text, and so this ended up on Flutter developers' default path.

I personally expect this trend to continue, as in most desktop native apps text is not selectable either. In fact, in many web apps (those that are really _apps_, not just static web-sites) there's lots on non-selectable text. Case in point, I just checked Gmail's landing screen, and I failed to find a single piece of selectable text.

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#173

I'll be the contrarian: Is this a good business decision? Sony has recently stated that it wants to enter the automotive industry but Google is a direct competitor with Waymo and their Nest product has a pretty firm standing in the smart home appliance environment. Is it wise to basically become dependent on a large competitor for such an integral component of your next generation products? What if Google decides to…

Fellow contrarian here. Is this a good business decision? The slide deck could have just said "We don't want to pay $10/unit for a Qt license" and saved us all the time. If you have half a gig of SDRAM and a playstation-class CPU, awesome. A lot of us don't. What if Google decides to give up maintenance of Flutter to the community and use an internal, better fork? I will never touch another Google-generated embedded…

> The slide deck could have just said "We don't want to pay $10/unit for a Qt license"

Qt has it's share of problems too. And someone is free to decide against depending on an oracle-like company.

> If you have half a gig of SDRAM and a playstation-class CPU, awesome.

Flutter is AOT compiled in release mode and is pretty efficient.

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#174

Earlier quoted context omitted.

Flutter's Text widget (which is generally the default for most devs when displaying text) doesn't allow for text selection. There's a SelectableText widget that does, though: https://api.flutter.dev/flutter/material/SelectableText-clas...

While Flutter makes text selection an explicit choice for developers, Text vs SelectableText, for some reason Text ended up being most used. This is likely because SelectableText came after Text and because of Flutter's mobile background. Most mobile apps use non-selectable text, and so this ended up on Flutter developers' default path. I personally expect this trend to continue, as in most desktop native apps text i…

Huh I never noticed that with gmail. I'm guessing it's because if I wanted to copy some sort of text, you could do it with the email detail page. And most text is selectable there, from the email name, actual emails, document content, etc. In mobile devices, text selection is such a pain so the desire to do it is less.

Does selectable text have a performance penalty? In iOS UILabel is far faster to render than UITextView, but only UITextView is selectable. I wouldn't mind if many of my UILabels were selectable, but I'm forced by performance constraints to not let it happen.

Maybe put forward making SelectableText the default and renamed to Text and Text is renamed to UnselectableText and becomes the non default if there isn't a perf penalty? It would need an automatic migrator for that to happen although.

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#175

Earlier quoted context omitted.

That has been worked on, they do use proper tags instead of a canvas so accessibility now works fine. The next issue is performance / scroll jank though and that will be tough to solve since the rendering model is very different from the web.

I tried it briefly and no they don't? For example, pressing "f" with Vimium should enumerate things that can be clicked(think anchor elements and button elements) but it enumerates nothing on https://gallery.flutter.dev/#/ . This is a pretty good proxy for accessibility too i.e. things that can be clicked look like they can be to the machine. A quick document.querySelectorAll('a') and document.querySelectorAll('butto…

(disclaimer: I work on Flutter Web)

Vimium is an interesting use-case. I've never heard of this extension. We have in the past enabled accessibility DOM all the time, but due to performance concerns changed it to be opt-in. If you use the standard screen reader (e.g. VoiceOver on iOS/macOS, TalkBack on Android, etc) you will get a way to enable accessibility DOM with ARIA tags, etc. Perhaps we should reconsider it (may need to optimize it a little though). I'd be curious whether Vimium works when accessibility is enabled.

Some features you list we either should support or already do: backswipe (good feature request), text selection (use the SelectableText widget), links (in the works), image URLs (good feature request). Not sure what navigating by landmarks is, but perhaps something we could support too.

Stylesheets are a non-goal. We do allow embedding plain HTML/CSS (called "platform view"), where you can use CSS, but Flutter's own widget system uses its own styling/theming.

Reader mode makes sense for "documents" (think news sites, wiki, documentation, etc), but it's unlikely to work out of the box in dynamic apps (think email, calendar, maps, graphics editor, etc) which is the kind of apps Flutter is going for. There's a similar issue with Ctrl + F (Cmd + F) to find text on page, which is not helpful in dynamic apps. Dynamic apps are better off implementing their own app-specific "reader mode" and "search bar", one that takes the nuances of the app into account. But never say never, maybe that's doable too, perhaps using our accessibility tree, at least for static document use-cases.

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#176
post #32

Earlier quoted context omitted.

It's unfortunate that the web mode uses a canvas and won't work with native browser accessibility stuff. That was the show stopper for me last time I've tried it.

That has been worked on, they do use proper tags instead of a canvas so accessibility now works fine. The next issue is performance / scroll jank though and that will be tough to solve since the rendering model is very different from the web.

Do give `--dart-define=FLUTTER_WEB_USE_SKIA=true` a try (`flutter run` and `flutter build` take this option, which we hopefully will rename to something more reasonable soon). If that doesn't perform well, please file an issue: https://github.com/flutter/flutter/issues/new/choose

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#177

Earlier quoted context omitted.

Mine too. It does gradual typing better than any other language I've tried.

I think this means sometimes static sometimes dynamic. but can you explain some use cases for this? I am strongly in favor of static, coming from C.

If you want to convert your data to JSON you put it into a Map.

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#178
post #28

Honestly I don't get the appeal of Dart/Flutter for this use case for two major reasons: 1. Dart is garbage-collected; and 2. Dart has optional typing, which is to say it supports type hints but is essentially dynamically rather than statically typed. This presentation claims low overhead so I'm open to be proven wrong here. I wonder how much of that (if true) is Flutter and how much is Wayland (over X). I'd really l…

I would have thought embedded generally meant a bit more streamlined than running Dart as well. Something like https://lvgl.io (which I just heard about yesterday, thanks HN!)

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#179
post #158

Embedded doesn’t need wayland nor X.org. These two things implement desktop managers. Why would you run a desktop manager on a computer that runs one program only? For embedded, drm/kms is IMO better level of abstraction to base on. It only takes couple pages of code to get yourself a full-screen DRM-backed EGL context. I did it a few times for various Linuxes using Broadcom and Mali GPUs. I’ve evaluated Flutter coup…

Totally agree with your view. "It only takes couple pages of code to get yourself a full-screen DRM-backed EGL context." - interesting, I've been wanting to get rid of the X server and use opengl or vulkan on a mali GPU fullscreen without needing X or wayland. do you have example code online somewhere for this?

Here is one,

https://gist.github.com/Miouyouyou/89e9fe56a2c59bce7d4a18a85...

Re: Graphical User Interface Using Flutter in Embedded Systems [pdf]

#180

I think as Flutter matures it will change the game for native development. I'm building an app now for a well known startup and are converting their native codebases to Flutter. What is interesting is that I was able to compile the app to web with no extra work and now use that as an easy way to demo things to my client. From a cross-platform perspective that changes the game for me along with being able to build des…

When it provides a Delphi RAD tooling experience maybe.

And just like Delphi, it will suffer that although Dart is a general purpose language, its only reason for existence will be Flutter applications.

Post reply on HN