You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flutter doctor -v
[✓] Flutter (Channel dev, v0.5.7, on Mac OS X 10.12.6 16G29, locale zh-Hans-CN)
• Flutter version 0.5.7 at /Users/cai/fluttersdk/flutter
• Framework revision 66091f9696 (4 weeks ago), 2018-07-09 12:52:41 -0700
• Engine revision 6fe748490d
• Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2
I'm a flutter developer.
I use the flutter packages pub run build_runner build in cli.
The I get a error:
NoSuchMethodError: Attempted to use type 'Set' as a function. Since types do not define a method 'call', this is not possible. Did you intend to call the Set constructor and forget the 'new' operator?
Receiver: Set
Tried calling: Set()
I know that the --preview-dart-2 parameter should be added.
Where should I add this parameter to?
$ which pub
/Users/cai/fluttersdk/flutter/bin/cache/dart-sdk/bin/pub
$which dart
/Users/cai/fluttersdk/flutter/bin/cache/dart-sdk/bin/dart
$which flutter
/Users/cai/fluttersdk/flutter/bin/flutter
Or should I ask this question in flutter?
The text was updated successfully, but these errors were encountered:
This would be a tool version problem: the dart vm version 2.0.0-dev.63.0 complains as described but 2.0.0-dev.64.0 supports omitting new. So when the newer versions of various tools reach Flutter, the issue should go away, and at this point you can include new as a work-around.
natebosch
changed the title
Did you intend to call the Set constructor and forget the 'new' operator?
Published packages are missing a dev.64.0 SDK constraint but not using newAug 10, 2018
This was my mistake, when I dropped new I failed to update the minimum SDK constraint to one that had a Dart 2 VM by default, and flutter users today have a VM which is Dart 1 by default.
My plan is:
Cut a branch from the commit before I dropped new.
Update pubspecs to a +1 release from whatever versions are publish today and publish - everyone on and older SDK should resolve to these
Go back to master and bump minimum SDK constraints and publish a +2 for everything so that we're back to the code we expect everyone to be on where possible
flutter doctor -v
[✓] Flutter (Channel dev, v0.5.7, on Mac OS X 10.12.6 16G29, locale zh-Hans-CN)
• Flutter version 0.5.7 at /Users/cai/fluttersdk/flutter
• Framework revision 66091f9696 (4 weeks ago), 2018-07-09 12:52:41 -0700
• Engine revision 6fe748490d
• Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2
I'm a flutter developer.
I use the
flutter packages pub run build_runner build
in cli.The I get a error:
I know that the --preview-dart-2 parameter should be added.
Where should I add this parameter to?
Or should I ask this question in flutter?
The text was updated successfully, but these errors were encountered: