Having an asynchronous function that doesn\'t return a value, what\'s the ideal return type Future
or Future
?, or more specific
The type Null
only allows the value null
The type void
allows values of any type, but communicates that the value shouldn't be used.
It's not yet clear to me how tools support will treat void
. There will probably linter rules that hint or warn at using void
values.
Null
was used instead of void
previously because void
was only supported as return type of methods/functions.