Commit 1633ac7f authored by Chinmay Garde's avatar Chinmay Garde

Use the more concise syntax for initialization of variables in the constructor

parent 7b77043e
......@@ -16,10 +16,8 @@ class SpringDescription {
/// constructor provided for this purpose
final double damping;
SpringDescription({double mass, double springConstant, double damping})
: mass = mass,
springConstant = springConstant,
damping = damping {
SpringDescription(
{double this.mass, double this.springConstant, double this.damping}) {
assert(mass != null);
assert(springConstant != null);
assert(damping != null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment