Reputation: 2073
in dart 2.0,types are mandatory,will dart 2.0 or 2.x add extension methods like
static int WordCount(this String str){
// custom String method here
}
Upvotes: 1
Views: 1085
Reputation: 17766
Updated answer
As of today, Dart 2.6, added extension methods support.
Upvotes: 0
Reputation: 658087
No, there won't be extension methods in 2.0.
There is a lot of work going on to be able to move faster after 2.0. I think extension methods is a popular wish, but there is no definitive statement Dart will get them.
Upvotes: 3