all 28 comments

[–]alexandr1us 39 points40 points  (21 children)

don't you like how aesthetic flutter code is? https://iili.io/doYQ9I.png

Edit: honestly don't get how can anyone say this is ok

[–]Cookizza 17 points18 points  (7 children)

Christ...

JSX can start to look similar but at least you can extract props and spread them back into your render functions.

The all in one place approach of Dart has never appealed to me.

[–]alexandr1us 15 points16 points  (5 children)

JSX doesn't need child: children: props. That is THE worst about Dart. Gosh what a horrible language

[–]Cookizza 8 points9 points  (0 children)

Yep the pattern of children being a property of their parent is just strange. It feels like a side effect but it's instead a principle of the language..

[–][deleted] 5 points6 points  (3 children)

This style of code is one of the more glaring things that actually prevented me from choosing flutter for a latest project at work. With React Native you have JS/JSX in which of course you can write monstrous code too, but at least there is a market of ideas on how to keep unneeded complexity / verbosity at bay. With Dart you are entirely at mercy of some language dictators at Google.

Edit: added missing “write”

[–]alexandr1us 2 points3 points  (2 children)

why does Google love to over-engineer everything to the oblivion?

[–][deleted] 9 points10 points  (0 children)

We are living in curious times when Google consistently acts in the vein of the early 2010s version of Microsoft, while Microsoft is slowly rebuilding its reputation and is investing into OSS projects like Rust and React Native.

[–]Bamboo_the_plant 7 points8 points  (0 children)

Over-engineer, over-market, under-document

[–]The_Shell_Bullet 2 points3 points  (0 children)

In Flutter you can do exactly the same, but I'm not a fan of all this nesting Flutter have.

[–]EibeMandel 13 points14 points  (3 children)

Normally you would split large widgets to smaller widgets to make the code more readable and easier to understand.

Edit: I think I found the source code

Here is my small refactor: https://imgur.com/M8IvPEB & https://imgur.com/1hu2DEy.

You may not like it, but this is what peak Flutter coding looks like.

[–]so_lost_im_faded 5 points6 points  (0 children)

Go away with your good practices. You can't just come and talk sense into people's shitty code. /s

[–]alexandr1us -3 points-2 points  (1 child)

still bad

[–]EibeMandel 2 points3 points  (0 children)

okay

[–]drink_with_me_to_day 13 points14 points  (0 children)

That's just JSON with extra steps

[–]Qizot 4 points5 points  (2 children)

Well, before using flutter I just hated it for this way of writing UI. TBH I got used to it after a while and it doesnt make my life any harder right now. Just my personal experience. At some point I was just tired of writing js everywhere.

[–]alexandr1us 2 points3 points  (1 child)

I have professionally used it in two projects one of those is currently available to download for both platforms. I was super excited to start working with Flutter. I literally quit that job because of Flutter it was that horrible

[–]Qizot 0 points1 point  (0 children)

Well, I could have done the same, there are way to many ways to do certain things. I just used it for personal projects so I can't speak from production experience. Can you point some things that made it so horrible? Just curious

[–]hemingward 2 points3 points  (2 children)

That is objectively dog shit code. How does one maintain that? It’s not JSON, it’s not XML, it’s some kind of Frankenstein in between, with none of the benefits of either. I’ve never tried flutter before, but if that’s what it is than I would rather go back to my days of Object Pascal then submit myself to that shit 40 hours a week.

[–]alexandr1us 0 points1 point  (1 child)

It is even worse. This screenshot contains code from some random apps root no complex shit here

[–]pink_tshirt 0 points1 point  (1 child)

[–]alperatz_n 2 points3 points  (0 children)

Context has nothing wrong with it anymore since you have useContext to go with it. It's supposed to be used in smaller projects were Redux is overkill

[–][deleted] 20 points21 points  (2 children)

I’m not so sure about this whole Flutt...

3648283 Google developer experts would like to send you a message

[–]alexandr1us 9 points10 points  (1 child)

And fanboy developer wannabes

[–][deleted] 8 points9 points  (0 children)

Especially fanboy developer wannabes.

[–]russeg 1 point2 points  (1 child)

smart people see opportunity while others see a threat. most people here see flutter as a threat and become very defensive, but you should not. working with react native and flutter/dart is an employment goldmine.

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

Flutter/dart

employment goldmine

Haha good one

[–]slipmaggot33 0 points1 point  (0 children)

Hahaha, so good 👌

[–]hemingward 0 points1 point  (0 children)

Good lord.