github vandadnp/flutter-tips-and-tricks 355
355 - FlatThen on Future in Dart

latest releases: 375, 374, 373...
3 years ago

If you have a Future<Iterable> and want to use "then()" on it, you will end up with the Iterable which you might need to map manually inside the "then()" function which results in a function call inside another function call, potentially making your code look more complicated than it should be. Using this extension on Future<Iterable>, you can make this a lot easier to read at call-site. Let me show you how => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/flatthen-on-future-in-dart/flatthen-on-future-in-dart.md

Don't miss a new flutter-tips-and-tricks release

NewReleases is sending notifications on new releases.