Time constructor Null safety

const Time(
  1. [int hour = 0,
  2. int minute = 0,
  3. int second = 0]
)

Constructs an instance of Time.

Implementation

const Time([
  this.hour = 0,
  this.minute = 0,
  this.second = 0,
])  : assert(hour >= 0 && hour < 24),
      assert(minute >= 0 && minute < 60),
      assert(second >= 0 && second < 60);