Gini constructor

const Gini({
  1. required int year,
  2. required double coefficient,
})

Creates a new Gini object with the given year and coefficient.

The year parameter must be greater than 1990, and the coefficient parameter must be between 0.0 and 100.0 (inclusive).

Implementation

const Gini({required this.year, required this.coefficient})
  : assert(year > minYear, "`year` should be greater than $minYear!"),
    assert(
      coefficient < maxCoefficient,
      "`coefficient` should be less than $maxCoefficient!",
    ),
    assert(
      coefficient > minCoefficient,
      "`coefficient` should be greater than $minCoefficient!",
    );