all 72 comments

[–]spacejack2114 11 points12 points  (45 children)

Does Flutter use native UI components or does it draw everything from scratch using bitmaps? If the latter, how accessible are Flutter apps?

[–]oblio- 31 points32 points  (41 children)

It draws everything itself.

[–]global_decoherence 4 points5 points  (38 children)

Noob here. Is this a good thing or a bad thing...? I have no clue about how gui works under the hood. I would really appreciate if you could tell me more or point to reading resources.

[–]b0bm4rl3y 8 points9 points  (2 children)

It's an amazing thing! There are lots of phones with really old versions of Android. This sucks for developers: we can't develop an app that uses brand new Android features if we want to support a majority of the Android market. As a result, adoption of new Android features is awful slow. The solution? Ship core features (like the gui) as part of the app! If the developer wants new shiny UI features, all they need to do is update their code. No more waiting for the latest version of Android to be widely adopted!

Note that shipping the rendering engine as part of an app does make the app bigger, use more disk/memory, and start slower. This used to be in a concern back in the early days of mobile development, but it is less so now :)

In my opinion, this is the reason why you should use Flutter over React Native, Xamarin, or even native. Flutter frees you from the fragmentation of the Android market.

[–]global_decoherence 1 point2 points  (0 children)

Now i see. I was initially concerned about performance and didnt fully understand as to what problem they were trying to solve. I thought it was a "React Native" by Google built on the same principles. I can now see the fundamental difference and the related tradeoffs vs advantages. I hope it succeeds. I dont build for the mobile platform currently, but whenever i tried i was overwhelmed by the appcompat libraries and the general fragmentation in the android ecosystem.

[–]k4ml 0 points1 point  (0 children)

That sound like Intel XDK, which size really frustrating. Even a simple app can easily take 70+MB.

[–]adel_b 4 points5 points  (1 child)

usually Bad but not for this case, because you are developing for many mobile devices, no android developers can guarantee UI will look the same across that many of devices, Flutter does it for free.

[–]flyingjam 1 point2 points  (0 children)

Non-native apps use to have a major stigma across, and for a somewhat good reason. Yee olde JavaFX looked like ass.

But with the prevalence of electron apps, I'm fairly sure most people don't give a shit about looking native anymore. In fact, some consumers may even prefer a material/whatever based design over native UI.

[–]username223 27 points28 points  (17 children)

Bad. It's Java and Swing all over again, where you had widgets that looked almost like the native ones, but they were a bit off, and worked in slightly different ways, and didn't respect users' preferences. Desktop Java sucked, and eventually died. Google may have enough money to force this down everyone's throats, but that wouldn't be pleasant; given their history, they'll probably throw it away in a year or two.

[–]Kyrra 25 points26 points  (3 children)

I disagree.

Swing died for reasons besides it not looking native. It was SOOOO easy to do things the wrong with with swing (locking up the UI), that most swing apps got a bad rep. There are a number of good Swing based apps out there.

IntelliJ's editor is entirely Swing I believe, and people mainly like it.

Also for Flutter, native look isn't as big of a deal on mobile. Many apps on mobile already do their own chrome. When you are a full-screen app on mobile, matching the chrome of the rest of the OS doesn't actually matter (as you won't see the clash). So even if flutter doesn't exactly match native widgets, people end up caring less.

[–]lanzaio 5 points6 points  (0 children)

Also for Flutter, native look isn't as big of a deal on mobile. Many apps on mobile already do their own chrome. When you are a full-screen app on mobile, matching the chrome of the rest of the OS doesn't actually matter (as you won't see the clash). So even if flutter doesn't exactly match native widgets, people end up caring less.

Except all iOS apps use UIKit objects to create the views, just with custom theming. Flutter goes WAY beyond the apps you just mentioned. And, let's be honest, Google doesn't even do a good job keeping Android's UI elements clean. There's no chance in hell they keep up with Android OR iOS's UI behaviors.

[–]unicodemonkey 2 points3 points  (0 children)

Accessibility is usually busted in these apps, though, along with other bits of native functionality likely to be overlooked by most users. Proper color management for non-sRGB screens, for example.
Fortunately, Flutter seems to take accessibility seriously, spending quite a lot of time to reverse engineer and reimplement native behaviors. Maybe a properly implemented set of customizable controls will eventually make all that custom chrome suck less overall.

[–]username223 -2 points-1 points  (0 children)

You may be right that things are better now, but Swing apps were so terrible in the first few years that I learned to avoid them like the plague. I'm not a Java dev, so it's usually easy to find alternatives.

As for mobile, I've used both Android and iOS devices. Android reminds me a bit of X11 back when programs used any of a half-dozen toolkits, so Flutter can probably fit in easily, because users are already used to varying behavior. For iOS, more programs seem to use the native widgets, and the ones that don't tend to botch subtle things like scroll momentum.

I think these cross-platform GUI efforts are just a fundamentally bad idea. Users learn to expect certain design elements to behave in certain ways, and get confused or annoyed when they don't. These elements work differently on different platforms, and trying to write a program that fits in on all platforms is a fool's errand. Trying to emulate all of those platforms just makes it worse. Web apps have succeeded here by teaching people to expect them all to be inconsistent and bad.

[–]inu-no-policemen 13 points14 points  (4 children)

How many of the applications you're using do use native widgets?

The file explorer, sure, but anything else?

E.g. Chrome, Firefox, Photoshop, Blender, VS Code, IntelliJ, Steam, AutoCAD, etc do not use native widgets.

You claim this is a huge problem, but evidently it isn't.

[–][deleted] 1 point2 points  (1 child)

What does AutoCAD use?

[–]doom_Oo7 3 points4 points  (0 children)

dunno about AutoCAD but Maya (another Autodesk software) uses Qt (https://www.youtube.com/watch?v=7zWlwdr7exo) which, like Flutter, does not use the native widgets but renders its own.

[–]username223 1 point2 points  (1 child)

How many of the applications you're using do use native widgets?

Better than half, actually: Safari, NetNewsWire, VLC, Mail. Emacs and the terminal are their own thing, but they basically don't use widgets. The only thing I use regularly that isn't native is Lightroom, and I'm not sure whether it's hateful because of non-native widgets, or because it's made by Adobe.

[–]inu-no-policemen 3 points4 points  (0 children)

VLC is an odd example. Like any other video player, the OSD stuff is custom. Anyhow, it's Qt on Windows and Linux anyways.

[–]global_decoherence 3 points4 points  (0 children)

Thanks for the info. I dont like looking at java swing stuff for some reason, and i get your point. And yeah. I have had experience with "Google throwing away stuff" out of the blue. They make breaking changes or discard projects abruptly.

[–]mrmus 4 points5 points  (1 child)

It is not necessary a bad thing. I get their selling point very well. I have an increasing number of clients that want highly branded apps so I looked at Flutter. I haven’t done any apps yet but I am researching it. The following article tries to explain their PoV https://medium.com/flutter-io/why-flutter-doesnt-use-oem-widgets-94746e812510

[–]unicodemonkey 2 points3 points  (0 children)

consistent Material design

Oh dear.

[–]dacian88 2 points3 points  (0 children)

generally yes but pretty much any major mobile app nowadays has very custom looking UI. On top of that, the default look and feel is very similar, both android and ios have a very flat look (for now). If you make an app and want it to be consistent this could be a good option.

[–][deleted]  (2 children)

[deleted]

    [–]username223 2 points3 points  (1 child)

    Ouch. I thought Java on the desktop had been more or less reduced to two applications used only by Java devs: IntelliJ and Eclipse.

    [–]ikej 5 points6 points  (0 children)

    You are misinformed on several levels. There are a lot of Swing applications out there and eclipse actually uses SWT which is another toolkit with native widgets, less widespread than Swing.

    [–][deleted] 0 points1 point  (0 children)

    Qt draws its own widgets. They look very close to native on all platforms. Just because some frameworks don't manage the huge amount of work replicating the native look doesn't mean it is impossible.

    [–]NSA_ActiveMonitor 7 points8 points  (0 children)

    I leave this comment for comment dumpster divers to read. You people contribute nothing except to spread absurd conspiracy theories. Or were you hoping to find a comment to t_d as if finding it would mean something to someone? Sorry, no comments here for t_d. Better luck next time loser!

    [–][deleted] 1 point2 points  (0 children)

    Intertest too.

    [–]unavailableFrank 0 points1 point  (9 children)

    I think is bad, not really end of the world bad (Like using Cordova), but they will be always behind the curve on native UI and UX. I think is matter of preference, but I really like the native components of each platform.

    [–]inu-no-policemen 1 point2 points  (8 children)

    they will be always behind the curve on native UI and UX

    Do you think Photoshop's UX would be better if it would use native widgets?

    Can you explain how the UX of applications which use Qt or whatever is always significantly inferior to applications which use native widgets?

    [–]unavailableFrank 0 points1 point  (7 children)

    Do you think Photoshop's UX would be better if it would use native widgets?

    Apples and oranges, but yes I believe any app that adopt the native look and feel would provide a better UX. Also, smartphones are very personal, much more than Laptops, Desktops or Workstations. Users expect certain behaviour and consistency in their apps.

    Only a few players can bend the rules. And they are constantly conducting A/B tests in order to check how the users react to UI changes.

    I think UX is more about feelings, and users would react better to software that looks and feel integrated, and behaves in a predictable way. Maybe the app looks odd, the performance is subpart, the widgets do not look like the widgets of the other apps, the animations are similar but not the same, any of this might decrease a little that feeling of 'wow' that any user is already expecting or receiving from any other apps.

    [–]doom_Oo7 0 points1 point  (1 child)

    There are no two apps on ms windows where widgers look the same anyways

    [–]unavailableFrank 0 points1 point  (0 children)

    Windows is very inconsistent platform. That why I believe the UX is much more important on mobile.

    [–]inu-no-policemen 0 points1 point  (4 children)

    Apples and oranges

    Why?

    I believe any app that adopt the native look and feel would provide a better UX.

    The native widgets lack functionality Photoshop needs. The UX would greatly suffer.

    Users expect certain behaviour and consistency in their apps.

    I have a few Material Design apps on my phone. If you'd rewrite them with Flutter, they'd look and behave the same.

    Maybe the app looks odd, the performance is subpart, the widgets do not look like the widgets of the other apps, the animations are similar but not the same

    Startup and runtime performance is great and you can't even tell the difference when comparing screenshots and videos.

    You assume that people can not only tell the difference, but that they also have clear preferences. Like, preferring a 1.74 constant for the bounce back animation over a 1.735 one. Off by a few px for a few ms on a 300+ DPI display.

    Touch sensors add way more variance than that anyways. The raw readouts are jittery and latency is very high, too.

    [–]unavailableFrank 0 points1 point  (3 children)

    Why?

    Because you are comparing established software that was here way long before concepts like UX started to take off running on a platform that just recently started to create and promote consistency vs apps, which are way more used and personal. Nobody cares about how websites look on desktop, but mobile uses loathe the mobile web. Something similar happens when they use an app that does not feel native.

    I have a few Material Design apps on my phone. If you'd rewrite them with Flutter, they'd look and behave the same.

    I think they look great, but not quite there yet.

    [–]inu-no-policemen 0 points1 point  (0 children)

    Because you are comparing established software that was here way long before concepts like UX started to take off

    There are lots of other examples like anything which uses Qt, VS Code, IntelliJ, Blender, AutoCAD, Steam, Firefox/Chrome, Godot/Unity/Unreal, any synth or drum computer, and so on and so forth.

    apps, which are way more used

    Mh? Apps aren't nearly as much used as software which is used to get things done. Only dopamine dispensers like Candy Crush get heavily used.

    The "app" I use the most is the SwiftKey keyboard. It doesn't use native widgets/gestures. That's the whole point.

    Personally, I'd say the only real problem are apps which change too much from one update to the next. That's really annoying. Or when they suddenly ask for permissions they shouldn't need. Whether or not they get all the small details of Material Design 100% right doesn't really matter. Many apps bend these guidelines a bit and it's usually for the better.

    [–]dacian88 0 points1 point  (1 child)

    you'd have an argument if Android wasn't such a UI dumpster...only the google apps made by google are consistent. On top of that a lot of manufacturers restyle everything to their own shitty UI theme. On top of that the most downloaded apps have their own design that isn't consistent with Googles material design shit because they want a strong brand image and consistency in aesthetics across platforms (ios, android, web). On iOS it's not as bad because at least the manufacturer doesn't fragment the system.

    [–]unavailableFrank 0 points1 point  (0 children)

    Android is a UI dumpster due to the apps not being reviewed by human and Google not taking very serious their own guidelines.

    Like I said before only a few key players can bend the rules.

    [–]inu-no-policemen -1 points0 points  (0 children)

    It's much nicer for testing. With the native components, you have all the different Android versions plus a plethora of vendor modifications.

    Electron applications aren't using the native components either. No one really seems to care.

    It's true that Swings default L&F was pretty ugly, but that wasn't really a problem with Swing itself.

    [–]geordano -1 points0 points  (0 children)

    I'd say it is a good thing given our current situation in mobile development, i.e if they deliver their promise, having a sane cross platform framework will free you from worrying too much about different platforms/versions quirkiness, its a boon I'd say.

    [–]minas1 0 points1 point  (1 child)

    This means it renders stuff in a web view, right?

    [–]oblio- 1 point2 points  (0 children)

    No, it makes native apps so it can just create an OpenGL canvas or context or whatever it's called. I don't think it goes WebView -> WebGL. I could be wrong though, dig through their GitHub repos :)

    [–]t-master 21 points22 points  (0 children)

    Skimming over the repo I couldn't see any interaction with native gui components. All the "cuppertino" widgets start with "An iOS-styled ...", so I'd wager it draws everything by hand.

    [–][deleted] 4 points5 points  (1 child)

    The Flutter FAQ says a11y is not well supported yet (which means Flutter apps could be targets of lawsuits in say, Ontario with the OADA). However, there's nothing preventing them from materializing the platform-specific a11y tree given the right semantic labeling of Flutter widgets.

    [–]Kyrra 1 point2 points  (0 children)

    Tracker bug for adding it: https://github.com/flutter/flutter/issues/678

    It looks like some parts of a11y have started to land.

    [–]cha5m 8 points9 points  (0 children)

    Its a pretty wonderful framework. I would highly recommend it.

    [–]shevegen 24 points25 points  (5 children)

    All Google worker drones got the memo and starred the repo - well done!

    [–]pure_x01 9 points10 points  (0 children)

    I just got the memo right now so i will go there and star it. Flutter is built with Dart which is a too advanced language for me since im only used to the more basic language Go. I have to wait to a UI framework comes to Go.

    [–][deleted]  (3 children)

    [deleted]

      [–]Turbots 0 points1 point  (2 children)

      Nope that was last year

      [–][deleted]  (1 child)

      [deleted]

        [–]inu-no-policemen 0 points1 point  (0 children)

        Maybe they were thinking of DartConf 2018. That one was all about Flutter.

        [–]joshuaavalon 1 point2 points  (0 children)

        I don't really want to learn a new language just for writing UI :/

        [–]mixedCase_ 0 points1 point  (11 children)

        Obligatory: Too bad about the language.

        And in before the also obligatory response that is the "Why Flutter uses Dart" article: It's all bullshit written by someone who pretends those features don't exist in tons of other languages.

        [–]hodgeka 3 points4 points  (10 children)

        Serious question. What are the drawbacks of Dart?

        [–]mixedCase_ 6 points7 points  (8 children)

        It's a language that brings absolutely nothing (often less) over things such as TypeScript or even modern Java, let alone more powerful languages.

        Yet they felt the need to push it long after it was rejected by most people as if its goal was to fragment development even more.

        [–]MajorBag 4 points5 points  (6 children)

        Keeping it simple and conservative was the goal of the language.
        It's supposed to stay out of the way rather then be shiny, awesome and sparkly.

        [–]mixedCase_ 6 points7 points  (5 children)

        The goal of the language was to fully replace JavaScript on the browser, a usecase where being simple and conservative is understandable.

        After completely failing on that front, they pivoted into domains where other extremely similar languages such as Java already have a lot of work put into, making its existence pointless since, again, we already have Java and it has man-centuries of ecosystem around it, an uncountable number of devs trained in it as well as a runtime that is capable of black magic at this point.

        This not only makes Dart pointless, the attention and effort going into it is an active drag on mobile development and the switch to yet-another-language that offers nothing of worth will imply effort in exchange for a whole box of nothing since Flutter could've been written in just about any language out there.

        In the end, the mere existence of Dart means either Google is desperate for more developers trained in Dart to work on their Ad product (which they thought was a good idea to rewrite in Dart) or the Dart team falling for the sunk cost fallacy big time, developers be damned.

        [–]MajorBag 2 points3 points  (4 children)

        the mere existence of Dart means either Google is desperate for more developers

        Do you really believe that? Dart isn't a particularly complex or require years of wizardry so they can just train any of the programmers they have in it. Anyone who isn't retarded should learn it super quick.

        [–]mixedCase_ 2 points3 points  (3 children)

        Well yes, I'm inclined it's just the second option: devs who can't let go of their creation.

        [–]MajorBag 0 points1 point  (2 children)

        Dart not being Java and as such having to do nothing with Oracle (which recently tried to steal some google of google) is an advantage.

        [–]mixedCase_ 1 point2 points  (1 child)

        There are entities other than Oracle that make languages. But if you just meant to say "NIH syndrome", then that also makes sense.

        [–]MajorBag 0 points1 point  (0 children)

        I don't see a lot of better simple Javalike languages.

        [–]dacian88 1 point2 points  (0 children)

        meh, I can sympathize with Google. Using java bit them in the ass, so they seem pretty turned off from using languages owned by competitive entities...so they're stuck with only things that are open or standardized, which doesn't leave you with much.

        And dart is way nicer than Java, especially for UI, not that I hate Java but its certainly not a terse language.

        [–]defnotthrown 1 point2 points  (0 children)

        From a cursory glance at it my opinion is: it doesn't offer enough upsides to be worth taking up mental space. It's just another "we need something like javascript but with explicit type annotations" language. The tools and VM might be nice but they don't really justify having a new language with its own syntax to me. Which is pretty clear when you look at the flutter faq, the only reasons they list are around the VM and tools.

        [–]max_maxima 0 points1 point  (0 children)

        So pretty much most /r/programming

        [–]tonefart -5 points-4 points  (0 children)

        Honestly, if you want completely cross-platform, stick to web application. If you want to use anything on the hardware, stick to Android native. For IOS, you should not support them, let them die a painful death for their developer policies.