Range constructor

const Range({
  1. required int start,
  2. int? limit,
})

A new range definition with start (>= 0) and optional positive limit.

Implementation

const Range({required this.start, this.limit})
    : assert(start >= 0, 'Start index must be >= 0.'),
      assert(limit == null || limit >= 0, 'Limit must be null or >= 0.');