Minimal reproducible code:
class Foo {
const Foo.one(Radius radius);
// Error: Evaluation of this constant expression throws an exception.
const Foo.two(double radius) : this.one(const Radius.circular(radius));
}
In the Foo.two constructor, why can't I just pass radius which itself is a constant? What's wrong in it?
PS: I don't want to fix the error by removing const from the constructor.