class Point { final double x; final double y; Point(this.x, this.y); Point.origin() : x = 0, y = 0;}
Good
class Point { final double x; final double y; const Point(this.x, this.y); const Point.origin() : x = 0, y = 0;}
Usage
To enable the prefer_const_constructor_declarations rule, add prefer_const_constructor_declarations under custom_lint > rules in your analysis_options.yaml file: