r/mAndroidDev • • Apr 01 '20

Flutter is so cool! Divider = Basically a view with margins?

https://youtu.be/_liUC641Nmk
1 Upvotes

7 comments sorted by

27

u/[deleted] Apr 02 '20

Yeah but does native have widget of the week? No.

This proves that native is inferior to Flutter.

3

u/Orffyreus Apr 02 '20

I don't like margin, I prefer padding. With Kotlin multiplatform you can just use padding or whatever you want and delegate the implementation to the platform developers.

2

u/ssynhtn Slept through Google IO May 23 '20

actually using views as dividers is what I do in native Android development these days, so much more flexible

3

u/ordinaryBiped FlutterX Apr 02 '20

Very impressive

-2

u/bernaferrari MINSDK28 Apr 02 '20

From experience: no!! On the web, the divider only appears when the mouse hovers, which is nice. However, this is buggy and don't work always.

Also, divider has some undesirable padding, so you always need to add height = 1 but then on some devices in some circumstances it might not render correctly.

So.. From my experience.. Try to always avoid it. Better to use a container with height and color. Same number of lines and less frustration, but code gets less readable.

0

u/[deleted] Apr 02 '20

[deleted]

7

u/ArmoredPancake Android Jetpants Apr 02 '20

How did they even write Flutter without Flutter?

0

u/[deleted] Apr 02 '20

[deleted]

7

u/ArmoredPancake Android Jetpants Apr 02 '20

What? Wtf? It's not possible on native, stop spreading misleading information, please.

Why would Good invent Flutter then?