OrdinalSortKey constructor Null safety

const OrdinalSortKey(
  1. double order,
  2. {String? name}
)

Creates a const semantics sort key that uses a double as its key value.

The order must be a finite number, and must not be null.

Implementation

const OrdinalSortKey(
  this.order, {
  String? name,
}) : assert(order != null),
     assert(order != double.nan),
     assert(order > double.negativeInfinity),
     assert(order < double.infinity),
     super(name: name);