Pattern: Use of {}
for empty constructor body
Issue: -
In Dart, a constructor with an empty body can be terminated with just a semicolon. This is required for const constructors. For consistency and brevity, other constructors should also do this.
Example of correct code:
class Point {
int x, y;
Point(this.x, this.y);
}
Example of incorrect code:
class Point {
int x, y;
Point(this.x, this.y) {}
}