Clock constructor

Clock(
  1. int year, [
  2. int month = 1,
  3. int day = 1,
  4. int hour = 0,
  5. int minute = 0,
  6. int second = 0,
  7. int millisecond = 0,
  8. int microsecond = 0,
])

A class that can be used instead of DateTime.

You can set a fixed time during testing by using setTestTime.

DateTimeの代わりに使うことのできるクラス。

setTestCurrentTimeを利用することで、テスト時に固定の時間を設定することができます。

For example, to create a Clock object representing the 7th of September 2017, 5:30pm

final dentistAppointment = Clock(2017, 9, 7, 17, 30);

Implementation

Clock(
  super.year, [
  super.month,
  super.day,
  super.hour,
  super.minute,
  super.second,
  super.millisecond,
  super.microsecond,
]);