WeightedKey<T> constructor

WeightedKey<T>({
  1. required String name,
  2. required String getter(
    1. T obj
    ),
  3. required double weight,
})

Instantiates it

Implementation

WeightedKey({
  required this.name,
  required this.getter,
  required this.weight,
}) : assert(weight > 0, 'Weight should be positive and non-zero');