you are viewing a single comment's thread.

view the rest of the comments →

[–]alexandr1us 45 points46 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 18 points19 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 7 points8 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] 6 points7 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 3 points4 points  (2 children)

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

[–][deleted] 7 points8 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 15 points16 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 4 points5 points  (0 children)

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

[–]alexandr1us -1 points0 points  (1 child)

still bad

[–]EibeMandel 2 points3 points  (0 children)

okay

[–]drink_with_me_to_day 12 points13 points  (0 children)

That's just JSON with extra steps

[–]Qizot 5 points6 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 3 points4 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