site-www icon indicating copy to clipboard operation
site-www copied to clipboard

Document performance/trade-offs of generator functions

Open feinstein opened this issue 1 year ago • 2 comments
trafficstars

The Flutter Style Guide discourages the use of generator functions, citing there's runtime overhead.

I wish this behaviour and trade-offs were documented somewhere.

Also, should the List/Iterable tutorials have a link to the generator docs?

feinstein avatar Jul 30 '24 23:07 feinstein

Thanks for filing an issue, @feinstein. This does feel like something that would fit into the generators section in the function documentation:

https://dart.dev/language/functions#generators

Also, should the List/Iterable tutorials have a link to the generator docs?

Do you mind sharing a link for the tutorials you're referring to?

redbrogdon avatar Jul 31 '24 20:07 redbrogdon

Sure:

https://dart.dev/language/collections

https://dart.dev/libraries/async/using-streams

feinstein avatar Jul 31 '24 23:07 feinstein