Drops constructor

Drops({
  1. double floor(
    1. double x
    )?,
  2. void onLand(
    1. double x,
    2. double y,
    3. double speed,
    4. double size,
    )?,
  3. double g = 0.8,
})

Implementation

Drops({
  double Function(double x)? floor,
  this.onLand,
  this.g = 0.8,
}) : floor = floor ?? ((_) => 0.0);