I followed this: How can I enable Flutter/Dart language experiments?
However, the spread operator still does not work for me.
I followed this: How can I enable Flutter/Dart language experiments?
However, the spread operator still does not work for me.
You need to run flutter upgrade
from the terminal and then update your Dart version constraint in pubspec.yaml
:
environment:
sdk: '>=2.5.2 <3.0.0'
The spread operator is not a language experiment anymore, hence, you do not need to enable any experiment.
Note that Dart 2.3.0
is the first version with the spread operator, however, at the time of writing 2.5.2
is already on the stable channel and should be your choice because of this.