Closed
Description
Consider a class like:
class MyThing {
final Set<int> myInts;
MyThing(this.myInts);
}
Today the generated fromJson
constructor would end up trying to pass in an Iterable<int>
to the constructor, which won't work. The workaround is:
class MyThing {
final Set<int> myInts;
MyThing(Iterable<int> myInts) : this.myInts = myInts.toSet();
}
...but ideally that wouldn't be necessary :).
fwiw, for List
fields it will automatically call toList
on the iterable before passing it in.