r/FlutterDev • • Nov 02 '20

Article 100 awesome Flutter tips

I have compiled 100 Flutter tips in 5 pages of 20 awesome flutter tips. Hope if it will help be beginners and intermediates.

https://github.com/erluxman/awesomefluttertips

169 Upvotes

25 comments sorted by

5

u/dantheman252 Nov 02 '20 edited Nov 02 '20

I don't think #45, example 1, line 15 would work.

4

u/dantheman252 Nov 02 '20

int getSum(int first, int second) => first + second;

printSomething1(int first, int second) => print(getSum);

void main() {

printSomething1(2, 4);

}

prints out "closure getSum"

1

u/dantheman252 Nov 02 '20

Will say though very much enjoyed the list!

1

u/erluxman Nov 03 '20 edited Nov 03 '20

Thanks for the feedback.. Will update the sample

2

u/ZiyanJunaideen Nov 03 '20

Amazing stuff. Thanks. Very helpful.

1

u/erluxman Nov 03 '20

Thanks 🙏🏼

2

u/tolios81 Nov 03 '20

I just started learning flutter coming from a strong Android native background, I would have to say this is a perfect list of tips to get a strong start. Thank you very much I was looking for something similar! One improvement could be to group the tips by subject, like libs, widgets, dart etc... Great work! 👍

1

u/erluxman Nov 03 '20

Thanks 🙏🏼

2

u/HDI1234 Nov 03 '20

Thanks! Just started learning Flutter and this helps alot.

1

u/erluxman Nov 03 '20

Thanks 🙏🏼

3

u/thkp_jon Nov 02 '20 edited Nov 02 '20

This is great! Big fan of tip #59 :-)

1

u/erluxman Nov 02 '20

Thanks ;)

1

u/Edje09 Nov 02 '20

Dug through most of the list just to see what this was. Did not disappoint. ✊🏻✊🏿

2

u/katie_lies Nov 02 '20

Great work, thank you! This is indeed an awesome collection of tips, I picked up a ton of ideas from reading through the list.

2

u/Enough-Bandicoot983 Nov 02 '20

For #5 (data classes), I would recommend using built_value and built_collection.

3

u/killergamesapp Nov 02 '20

built_value

I would also add freezed to that list because it makes unions so simple.

Here is a nice article comparing the pros and cons of each: https://itnext.io/comparing-freezed-to-built-value-3ff978c8647

2

u/killergamesapp Nov 02 '20

This is fantastic! Just a reminder that there's always an incredibly useful widget that you still don't know about, so always keep learning!

2

u/krimpenrik Nov 03 '20

Thanks awesome list

2

u/Stem3576 Nov 03 '20

Post saved! Thanks

1

u/matheustsa Nov 02 '20

Why #12 is bad?

2

u/gmatuella Nov 02 '20

Definitely not bad, just a code style preference IMO

2

u/Cladser Nov 02 '20

Well I learnt 2 good things on the first page, not bad at all, take my upvote sir!

0

u/[deleted] Nov 02 '20

[deleted]

0

u/erluxman Nov 02 '20

Thanks ;)